The 'java ch9' quiz assesses understanding of Java inheritance concepts, including superclass\/subclass relationships, the 'is-a' relationship, and the use of 'super' and 'protected' keywords. It is ideal for learners aiming to enhance their Java OOP skills.
A. inheritance, the “copy-and-past” approach.
B. the “copy-and-past” approach, inheritance.
C. a class that explicitly extends Object, a class that does not extend Object.
D. a class that does not extend Object, a class that explicitly extends Object.
Rate this question:
A. Integer.
B. Object.
C. String.
D. Class.
Rate this question:
A. private instance variables and methods.
B. protected instance variables and methods.
C. private constructors.
D. protected constructors.
Rate this question:
Ford/Taurus.
University/Brown University
Sailboat/Tugboat
Country/USA
Rate this question:
base.
This
Public
Super
Rate this question:
A. Overloaded methods have the same signature.
B. Overridden methods have the same signature.
C. Both of the above.
D. Neither of the above.
Rate this question:
“knows-a” relationship.
“has-a” relationship.
“uses-a” relationship.
“is-a” relationship.
Rate this question:
Public access.
B. package access.
C. private access.
D. block scope.
Rate this question:
A. All of the above.
B. None of the above.
C. A, B and C.
D. A, B and D.
Rate this question:
A. by calling private methods declared in the superclass.
B. by calling public or protected methods declared in the superclass.
C. directly.
D. All of the above.
Rate this question:
A. whether two references refer to the same object in memory.
B. whether two references have the same type.
C. whether two objects have the same instance variables.
D. whether two objects have the same instance variable values.
Rate this question:
A. keyword super, followed by a dot (.) .
B. keyword super, followed by a set of parentheses containing the superclass constructor arguments.
C. keyword super, followed by a dot and the superclass constructor name.
D. None of the above.
Rate this question:
A. changeText.
B. setText.
C. changeLabel.
D. setLabel.
Rate this question:
All methods can be inherited
All instance variables can be uniformly accessed by subclasses and superclasses.
Objects of a subclass can be treated like objects of their superclass.
None of the above.
Rate this question:
A subclass is generally larger than its superclass.
A superclass object is a subclass object.
The class following the extends keyword in a class declaration is the direct superclass of the class being declared.
Java uses interfaces to provide the benefits of multiple inheritance.
Rate this question:
A. A syntax error occurs.
B. A compile-time error occurs.
C. A run-time error occurs.
D. The program compiles and runs because the instance variables are initialized to their default values.
Rate this question:
A. Both variables a and b are instance variables.
B. After the constructor for class B executes, the variable a will have the value 7.
C. After the constructor for class B executes, the variable b will have the value 8.
D. A reference of type A can be treated as a reference of type B.
Rate this question:
A. Image.
B. Icon.
C. ImageIcon.
D. IconImage.
Rate this question:
A. Both ducks and geese are birds that know how to start flying from the water.
B. All vehicles know how to start and stop.
C. All animals lay eggs, except for mammals.
D. All paints have a color.
Rate this question:
A. A subclass object can assign an invalid value to the superclass’s instance variables, thus leaving an object in an inconsistent state.
B. Subclass methods are more likely to be written so that they depend on the superclass’s data implementation.
C. We may need to modify all the subclasses of the superclass if the superclass implementation changes.
D. All of the above.
Rate this question:
A. empty copy.
B. deep copy.
C. full copy.
D. shallow copy.
Rate this question:
A. a compile-time error.
B. a syntax error.
C. infinite recursion.
D. a runtime error.
Rate this question:
Quiz Review Timeline (Updated): Mar 21, 2023 +
Our quizzes are rigorously reviewed, monitored and continuously updated by our expert board to maintain accuracy, relevance, and timeliness.
Java Regex Quiz
How much do you know about Java Regex? In Java, Regex, also known as Regular Expression is an API that helps in defining a pattern that can be used to search, edit or...
Questions:
10 |
Attempts:
930 |
Last updated:
Mar 21, 2023
|
Java Assessment Quiz
How much do you know about Java? Well, soon, we will find it out when you will take this Java assessment quiz. Java is known as a high-level, class-based, object-oriented...
Questions:
15 |
Attempts:
1707 |
Last updated:
Jun 17, 2024
|
Informatics Practice Quiz: Exam!
The Informatics Practice Quiz: Exam assesses knowledge in Java programming, focusing on swing controls, operators, loops, and switch-case statements. It is designed to test...
Questions:
10 |
Attempts:
453 |
Last updated:
Mar 19, 2023
|
Code Buzz (Language : Java)
"A good programmer is someone who always looks both ways before crossing a one-way street"
Do you have a wide vision on programming?
Do you have control on several...
Questions:
30 |
Attempts:
231 |
Last updated:
Mar 20, 2023
|
Java MCQ: Ultimate Trivia Quiz!
Dive into the Java MCQ: Ultimate Trivia Quiz! Test your knowledge on Java fundamentals, including bytecode files, constructors, and JVM's role. Perfect for learners aiming to...
Questions:
29 |
Attempts:
662 |
Last updated:
Mar 22, 2023
|
Programming 11: Java Assesement Exam
This will be the first quiz of our Programming 11 class. It will be to review basic introductory concepts covered in our Java Topics.
Questions:
38 |
Attempts:
412 |
Last updated:
Mar 21, 2023
|
Wait!
Here's an interesting quiz for you.