Course:: The Quiz Questions
Course:: The Quiz Questions
1. What is inheritance?
Modification of methods.
Remove methods.
B
C
Object
String
If you put the final keyword in front of a variable, then the value ca nno.
If a data member is an object, the final keyword refers to tthe referencet, not to
tthe valuet.
If a class is denoted with final, then you cannot tinherit fromt the class.
If a method is final in a class, then the method cannot tbe overriddent in the
subclasses.
Object is an interface.
The answers
1. What is inheritance?
Modification of methods.
Remove methods.
X Create new data members.
X Create new methods.
3. In the following statement what can you use instead of the question mark
(?)? There is a superclass A, which has a subclass B, and there is a C which
is the subclass of B.
? x = new B();
X A
X B
C
X Object
String
If you put the final keyword in front of a variable, then the value cannot bet
tchangedt.
If a data member is an object, the final keyword refers to tthe referencet, not to
tthe valuet.
If a class is denoted with final, then you cannot tinherit fromt the class.
If a method is final in a class, then the method cannot tbe overriddent in the
subclasses
Object is an interface.