Exam 7: Inheritance
Exam 1: Getting Started46 Questions
Exam 2: Console Input and Output29 Questions
Exam 3: Flow of Control43 Questions
Exam 4: Defining Classes I44 Questions
Exam 5: Defining Classes Ii46 Questions
Exam 6: Arrays47 Questions
Exam 7: Inheritance43 Questions
Exam 8: Console Input and Output43 Questions
Exam 9: Exception Handling45 Questions
Exam 10: File IO46 Questions
Exam 12: Uml and Patterns22 Questions
Exam 13: Interfaces and Inner Classes32 Questions
Exam 14: Generics and the Arraylist Class31 Questions
Exam 15: Linked Data Structures43 Questions
Exam 16: Collections and Iterators44 Questions
Exam 17: Swing I37 Questions
Exam 18: Swing II31 Questions
Exam 19: Java Never Ends18 Questions
Exam 11: Recursion43 Questions
Exam 20: Applets25 Questions
Select questions type
What does a derived class automatically inherit from the base class?
Free
(Multiple Choice)
4.7/5
(30)
Correct Answer:
D
What is encapsulation?
Free
(Essay)
5.0/5
(40)
Correct Answer:
Encapsulation is synonymous with data and detail hiding.Java supports such hiding through the private modifier.
If an instance variable is not modified by public,protected or private then it is said to have:
(Multiple Choice)
4.9/5
(34)
What are the different ways in which you can check the class of an Object?
(Essay)
4.7/5
(36)
Define a derived class to represent an alarm clock.Use the Clock class,created in number 2 above,as your base class.
(Essay)
4.8/5
(43)
You may substitute the keyword this for super()to call a constructor of the derived class.
(True/False)
4.9/5
(33)
Write Java statements that compares Objects,O1 and O2,using the getClass()method.
(Essay)
4.9/5
(35)
Explain the difference between method overloading and method overriding.
(Essay)
4.8/5
(42)
The class __________ is an ancestor class of all Java classes.
(Multiple Choice)
4.8/5
(33)
If the final modifier is added to the definition of a method,this means:
(Multiple Choice)
4.8/5
(31)
Private methods of the base class are not available for use by derived classes.
(True/False)
4.7/5
(38)
A constructor for a derived class begins with an invocation of a constructor for the base class.
(True/False)
4.9/5
(33)
An object of a derived class has the type of the derived class,and it also has the type of the base class,and more generally,has the type of every one of its ___________ classes.
(Multiple Choice)
4.9/5
(32)
Overriding is when a derived class redefines a method from the base class.
(True/False)
4.8/5
(42)
The call to the base class constructor (super)must always be the last action taken in a constructor definition.
(True/False)
4.9/5
(37)
A derived class is a class defined by adding instance variables and methods to an existing class.
(True/False)
4.8/5
(37)
Showing 1 - 20 of 43
Filters
- Essay(0)
- Multiple Choice(0)
- Short Answer(0)
- True False(0)
- Matching(0)