Karteikarten
OOP - Inheritance Constructors and Super
Karten in diesem Stapel (6)
- 1Each subclass must call the _____ constructor Why?superclass
to initialize instance variables from the superclass - 2Super What does it do?Calls the superclass constructor.
public officer(String name, int age, int houseNo){
super(name,age);
this.houseNo = houseNo;
} - 3Are the private superclass members hidden in a subclass?Yes
- 4If a modifier is set to public, who can see it?Other classes which instantiate that object and subclasses
- 5If a modifier is set to private, who can see it?ONLY that class
- 6If a modifier is set to PROTECTED, who can see it?- Superclass
- Subclasses
- Members in the same package
Informationen
- Beschreibung
- Masters Programming I Karteikarten am OOP - Inheritance Constructors and Super, erstellt von nhunsdale02 am 06/06/2014.
- Erstellt von
- nhunsdale02
- Aufrufe
- 16
- Bewertung