Question 47Asked in DSSSB TGT Computer Science (Technical), 7 Aug 2021, Shift 2

Which of the following is/are correct about java programming?

Which of the following is/are correct about java programming? I. All functions in java must be members of some class II. Member functions are called methods in java
  1. AOnly I
  2. BOnly II
  3. CBoth I and II
  4. DNeither I nor II
Show answerHide answer

Correct answer: (C) Both I and II

Explanation

Java has no free-standing functions: every method must belong to a class, and member functions are called methods. Both are correct.

From DSSSB TGT Computer Science PYQ (Technical), 7 Aug 2021, Shift 2

This is question 47 of DSSSB TGT Computer Science PYQ (Technical), 7 Aug 2021, Shift 2. See all questions of this paper with answers, or attempt the paper as a timed online test to get your score and all-India rank.