Which of these class is superclass of every class in Java? a) String class b) Ob
ID: 3828639 • Letter: W
Question
Which of these class is superclass of every class in Java?
a) String class
b) Object class
c) Abstract class
d) ArrayList class
ANS:______________________________
Which of these keywords can be used to prevent inheritance of a class?
a) super
b) constant
c) Class
d) final
ANS:___________________________
Which of these class relies upon its subclasses for complete implementation of its methods?
a) Object class
b) abstract class
c) ArrayList class
d) None of the mentioned
4. Which of the following statements are incorrect?
a) static methods can call other static methods only.
b) static methods must only access static data.
c) static methods can not refer to this or super in any way.
d) when object of class is declared, each object contains its own copy of static variables.
ANS:________________
Which of these keywords is used to prevent content of a variable from being modified?
a) final
b) last
c) constant
d) static
ANS:_____________________
Explanation / Answer
Question 1:
Answer: b) Object class
object class class is superclass of all other classes.
Question 2:
Answer:d) final
Question 3:
Answer:b) abstract class
all the methods defined in abstract class need to define the method implementation in its subclass
Question 4:
Answer: d) when object of class is declared, each object contains its own copy of static variables.
All objects of class share same static variable,
Question 5:
Answer: a) final
final preverts from modifiying the data
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.