
U9 Video 9.3
Interactive Video
•
Computers
•
11th Grade
•
Practice Problem
•
Easy
Lauren Wheelwright
Used 2+ times
FREE Resource
5 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
When does a method override occur?
Anytime we use the @Override on the line before the method in the subclass.
Anytime we use the @Override on the line before the method in the superclass.
Anytime we use the @Override on the line before the method in the subclass and the method signatures match.
Anytime a subclass method signature matches that of the superclass
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Why do we use the @Override in our code?
When we use it, the compiler checks that we are actually overriding the method we intended to.
It is required to override a method.
It tells Java to skip that method in the code.
It tells Java to exit out of the code at this point.
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Why might we want to override a superclass method? Select the best option.
We override methods so that we can see how a method is working within the class.
We override methods because superclasses cannot correctly define most subclass behaviors.
We override a method because a subclass needs to define a behavior in a different way than the superclass.
We override methods to make Java run more efficiently.
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
How does Java determine the order to execute methods between superclasses and subclasses?
Java first looks in a subclass for a method signature. If it is found there, it executes that method. Otherwise it checks the superclass methods
Java first looks in a superclass for a method signature. If it is found there, it executes that method. Otherwise it checks the subclass methods.
Java first looks in a superclass for a method signature. If it is found there, it executes that method after checking the subclass for an override.
Java starts in the Object class and works its way down the hierarchy until it finds the correct method signature.
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
From a design perspective, what goes in the subclass?
Modified/Overridden methods
Additional instance variables specific to the subclass
Additional methods specific to the subclass
All of these options
Access all questions and much more by creating a free account
Create resources
Host any resource
Get auto-graded reports

Continue with Google

Continue with Email

Continue with Classlink

Continue with Clever
or continue with

Microsoft
%20(1).png)
Apple
Others
Already have an account?