GoConqr hat ein neues Design! Sag uns, wie es dir gefällt.

Karteikarten

OOP - Constructors

nhunsdale02 Programming I Masters Englisch 9 Karten

Karten in diesem Stapel (9)

  1. 1Does every class have to have a constructor?Yes, even if you do not make one a default constructor will be created
  2. 2A Constructor with Arguments create a constructor for a class called Nathan with paramters name, age, and house numberpublic Nathan(String name, int age, int houseNo){
    this.name = name;
    this.age=age;
    this.houseNo=houseNo;
    }
  3. 3"this" keyword What is it?A reference to the current object
  4. 4"this" keyword Does it refer to the instance variable or the Parameter name?instance variable
  5. 5Overloading What does it mean?The same method/constructor can be defined with more than one signature
  6. 6Constructors with Arguments What are the 4 benefits?- Create and initialize values in one go
    - Quicker for programmer
    - Quicker for Application(less operations)
    - Less testing
  7. 7Control of Variable Initialization Constructors can be used to apply _____ _____business rules
  8. 8Default instructor Should you always include one even if there is a constructor that takes parameters?YES
  9. 9Constructors with Parameters What is the main advantage?Convenience...creating an object and putting in the data in one go

Informationen

Beschreibung
Masters Programming I Karteikarten am OOP - Constructors, erstellt von nhunsdale02 am 06/06/2014.
Erstellt von
nhunsdale02
Aufrufe
21
Bewertung

Feedback

Worum geht es?

Wie gefällt dir das neue Design?

Dein Eindruck