Inheritance

Description

Flashcards on Inheritance, created by alim586 on 24/06/2015.
alim586
Flashcards by alim586, updated more than 1 year ago
alim586
Created by alim586 almost 9 years ago
1
0

Resource summary

Question Answer
Inheritance a class can inherit properties and behavior of another class
Why inheritance? - Smaller derived class definitions - Ease of modification of common properties -Extensibility -Use tried-and-tested code from a base class - concentrate on the specialized behavior of your class -logical structures and grouping
Why can a class extend multiple classes? Because a derived class may inherit different implementations for the same method signature from multiple base classes
An abstract class can define only ... methods and .... abstract constants
A class can inherit ... or ... class zero or one
A class uses the keyword ... to inherit a class extend
a class can inherit ... interfaces multiple
A class uses the keyword ... to implement an interface implements
Can an interface implement a class? No
An interface uses the keyword ... to inherit interfaces extends
Can an abstract class inherit a concrete class and vice versa? Yes
Can an abstract class extend interfaces? No, it can implement interfaces
Can an abstract extend another abstract class? Yes
The variables of an interface are implicitly.. public, final and static
What should the first concrete class that is derived from a abstract class has to do ? supply the actual method implementation for all the abstract methods
Is it possible to create an object of type interface ? NO
what is casting casting is the process of forcefully making a variable behave as a variable of another type
the keywords this en super are implicit... object references
the 'this' reference always points to an object's own reference
Show full summary Hide full summary

Similar

DNA Basics
Sarah Juliette B
Java Week 5 Object Oriented Programming
Troy Bowlin
What does inheritance do?
joannazhang13
Let's see what you know
joannazhang13
AQA A2 Biology - Chapter 8 Inheritance and Selection
Charlotte Lloyd
Java Practice 1
Ummm No
OOP (Object Oriented Programming)
Adam Cook
Java Practice 2
Ummm No
Servion - Java Questionnaire
rohit.benedict
Java Core. Basics
Gadget
0654 IGCSE Coordinated Sciences Inheritance Quiz
Jeffrey Piggott