O GoConqr está de visual novo! Conte para nós o que você achou.

Flashcards

OOP - Constructors

nhunsdale02 Programming I Masters Inglês 9 flashcards

Flashcards do conjunto (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

Informações

Descrição
Masters Programming I FlashCards sobre OOP - Constructors, criado por nhunsdale02 em 06-06-2014.
Criado por
nhunsdale02
Visualizações
21
Avaliação

Fale Conosco

Sobre o que é sua mensagem?

O que você acha do novo visual?

Você gostou?