Which three statements are true?
IN
Select one or more:
a. A public static method in class X can be called by a subclass of X without explicitly
referencing the class X.
b. A protected method in class X can be overridden by any subclass of X.
C. A private static method can be called only within other static methods in class X.
d. A method with the same signature as a private final method in class X can be
implemented in a subclass of X.
e. A protected method in class X can be overridden by a subclass of A only if the
subclass is in the same package as X.
f. A non-static public final method in class X can be overridden in any subclass of X
g. A final method in class X can be abstract if and only if x is abstract.
Answers
Answer:
true
false
true
false
false
true
true
True/ False involves placing true in front of correct sentences and false in front of incorrect sentences.
- The given statements belong to the concept of Object Oriented Planning.
- The statements can be categorised as -
a. A public static method in class X can be called by a subclass of X without explicitly referencing class X. - False
b. A protected method in class X can be overridden by any subclass of X. - True
C. A private static method can be called only within other static methods in class X. - False
d. A method with the same signature as a private final method in class X can be implemented in a subclass of X. - False
e. A protected method in class X can be overridden by a subclass of A only if the subclass is in the same package as X. - True
f. A non-static public final method in class X can be overridden in any subclass of X - True
g. A final method in class X can be abstract if and only if x is abstract. - False
SPJ2