Java Inheritance Flashcard
Flashcard
•
Computers
•
11th Grade
•
Hard
Keith Fiore
FREE Resource
Student preview

15 questions
Show all answers
1.
FLASHCARD QUESTION
Front
What keyword is used to inherit a class in Java?
Back
extends
2.
FLASHCARD QUESTION
Front
Which of the following is true about the superclass and subclass relationship in Java?
Back
A subclass cannot access the private members of its superclass.
3.
FLASHCARD QUESTION
Front
What is method overriding in Java?
Back
Providing a specific implementation of a method that is already provided by its superclass.
4.
FLASHCARD QUESTION
Front
Correct way to call a superclass method from a subclass in Java: super.methodName();, this.methodName();, superclass.methodName();, methodName();
Back
super.methodName();
5.
FLASHCARD QUESTION
Front
If a method is declared as final in the superclass, what can the subclass do with this method?
Back
The subclass cannot override the method.
6.
FLASHCARD QUESTION
Front
Which of the following is NOT a rule for method overriding in Java?
- The argument list must exactly match that of the overridden method.
- The return type must be the same or a subtype of the return type declared in the original overridden method.
- A method declared final cannot be overridden.
- The overriding method must always be static if the overridden method is static.
Back
The overriding method must always be static if the overridden method is static.
7.
FLASHCARD QUESTION
Front
What happens if the `@Override` annotation is used with a method that does not override a superclass method?
Back
The compiler will generate an error.
Create a free account and access millions of resources
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
By signing up, you agree to our Terms of Service & Privacy Policy
Already have an account?
Similar Resources on Wayground
15 questions
Defensive Design - GCSE Computer Science OCR
Flashcard
•
10th Grade
12 questions
Тест з інформаційно-комунікативних технологій в освіті
Flashcard
•
KG - University
15 questions
Experimental Design!
Flashcard
•
10th - 12th Grade
15 questions
23 Algebra Chapter 6 Review
Flashcard
•
12th Grade
13 questions
ÔN TẬP LÝ THUYẾT LẬP TRÌNH HƯỚNG ĐỐI TƯỢNG (OOP)
Flashcard
•
KG
16 questions
English II EOC Review
Flashcard
•
10th Grade
12 questions
system life cycle G12
Flashcard
•
12th Grade
15 questions
RBT Exam Definitions Flashcard
Flashcard
•
KG - University
Popular Resources on Wayground
20 questions
Halloween Trivia
Quiz
•
6th - 8th Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
15 questions
Order of Operations
Quiz
•
5th Grade
20 questions
Halloween
Quiz
•
5th Grade
16 questions
Halloween
Quiz
•
3rd Grade
12 questions
It's The Great Pumpkin Charlie Brown
Quiz
•
1st - 5th Grade
20 questions
Possessive Nouns
Quiz
•
5th Grade
10 questions
Halloween Traditions and Origins
Interactive video
•
5th - 10th Grade
Discover more resources for Computers
20 questions
Halloween movies trivia
Quiz
•
7th - 12th Grade
15 questions
Halloween Characters
Quiz
•
7th - 12th Grade
10 questions
Halloween Movies Trivia
Quiz
•
5th Grade - University
14 questions
Halloween Fun
Quiz
•
2nd - 12th Grade
28 questions
Ser vs estar
Quiz
•
9th - 12th Grade
21 questions
Halloween & Math
Quiz
•
8th - 12th Grade
13 questions
Halloween Movie Trivia
Quiz
•
9th - 12th Grade
7 questions
Halloween - Myths & Legends
Interactive video
•
10th - 12th Grade