Skip to content

UGC NET CS 2018Programming Languages and Computer Graphics › Object Oriented ProgrammingVerified

UGC NET CS 2018 PYQ: In Java, which of the following statements is/are TRUE? S1: The ‘final’ keyword applied to a class…

In Java, which of the following statements is/are TRUE?

S1: The ‘final’ keyword applied to a class definition prevents the class form being extended through derivation

S2: A class can only inherit one class but can implement multiple interfaces

S3: Java permits a class to replace the implementation of a method that it has inherited. It is called method overloading

Code:

  1. A
    S1 and S2 only
    Correct answer
  2. B
    S1 and S3 only
  3. C
    S2 and S3 only
  4. D
    All of S1, S2 and S3

Answer

(A) S1 and S2 only

Approach

Check each statement against Java's rules for final classes, inheritance and overriding versus overloading.

Reviewed by UGC IQ Editorial Team.