Question 127Asked in DSSSB TGT Computer Science, 25 Jun 2023, Shift 2 (12:30 PM)

Which of the following statements is FALSE?

  1. AFinal methods can be overridden.
  2. B"static public void main(String...abcd){}" is a valid statement.
  3. CAbstract classes cannot be instantiated.
  4. DInterface allows default method definitions.
Show answerHide answer

Correct answer: (A) Final methods can be overridden.

Explanation

A final method cannot be overridden in a subclass, so (A) is false. The varargs main with modifiers in any order is valid, abstract classes cannot be instantiated, and Java 8 interfaces allow default methods.

From DSSSB TGT Computer Science PYQ, 25 Jun 2023, Shift 2 (12:30 PM)

This is question 127 of DSSSB TGT Computer Science PYQ, 25 Jun 2023, Shift 2 (12:30 PM). 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.