Question 127Asked in DSSSB TGT Computer Science, 25 Jun 2023, Shift 2 (12:30 PM)
Which of the following statements is FALSE?
AFinal methods can be overridden.
B"static public void main(String...abcd){}" is a valid statement.
CAbstract classes cannot be instantiated.
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)