
method overriding
Authored by Divakararao Lakhanapuram
Computers
University
Used 8+ times

AI Actions
Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...
Content View
Student View
10 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is method overriding in Java?
Writing a method in a subclass with the same name of superclass's method
Mentioning the same return type of the method of the superclass
The argument list in the method of subclass and the method of superclass should be the same
All the above
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Method Overriding is useful to add extra functionality or code to a method of subclass with the same name as the inherited method.
True
False
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
It is not mandatory to override all or a few methods of the Superclass.
false
true
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Why should a method be overridden in Java instead of writing a method with a different name?
Large projects heavily depend on inheritance
The code-base refers to the same method with the same method signature in different classes of the project
It is not possible to change the method calling code at all occurrences of the project. It may break the whole project.
All the above.
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
The Method-Overloading and Method-Overriding are not the same.
false
true
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Identify INVALID Java Method Overriding in the below code snippets?
Follow the notation "superclassMethod" and "subclassMethod".
void superclassMethod(int a, float b){ }
void subclassMethod(int a, float b) { }
void superclassMethod(){ }
void subclassMethod(){ }
int superclassMethod(int a, float b){ }
void subclassMethod(int a, float b) { }
None
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
A successful Method Overriding calls the method of ___ in Java.
Superclass
Subclass
intermediate super class
none
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?
Similar Resources on Wayground
10 questions
Android
Quiz
•
University
10 questions
TOOLS FOR AD & TECHNOLOGY DEVELOPMENT (W4-W6)
Quiz
•
University
15 questions
HTML
Quiz
•
University - Professi...
10 questions
Unguided transmission media
Quiz
•
University
10 questions
Understanding Email, Contacts and Calendaring
Quiz
•
University
12 questions
Python Quiz 1.4
Quiz
•
University
10 questions
Tree and Planar Graph
Quiz
•
University
10 questions
CodeMonkey for B.Ed IT
Quiz
•
University
Popular Resources on Wayground
15 questions
Fractions on a Number Line
Quiz
•
3rd Grade
20 questions
Equivalent Fractions
Quiz
•
3rd Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
22 questions
fractions
Quiz
•
3rd Grade
20 questions
Main Idea and Details
Quiz
•
5th Grade
20 questions
Context Clues
Quiz
•
6th Grade
15 questions
Equivalent Fractions
Quiz
•
4th Grade
20 questions
Figurative Language Review
Quiz
•
6th Grade