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

Flashcards

OOP - Instance and Static Variables

nhunsdale02 Programming I Masters Inglês 10 flashcards

Flashcards do conjunto (10)

  1. 1Local Variables What are they? What is there scope?Variables declared in the body of a method
    No scope beyond the method they were declared in
  2. 2Attempting to refer to variables beyond their scope will cause a _____ _____ errorcompile time
  3. 3Instance Variables What are they?Variables that are declared in the class NOT within a method
  4. 4What are getters and setters?2 methods that manipulate the attributes that belong to a particular object (or class)
  5. 5What is the general format of a "get()" method using an int as an example?public int getInt(){
    return classInt;
    }
  6. 6What is the general format of a "set()" method using an int as an example?public void setInt(int age){
    this.age = age;
    }
  7. 7Static Variables Every object has its own copy of all the instance variables of the class. "static" makes the variable _____constant
  8. 8Static Variables What is their scope?Class Wide
  9. 9Static Variables How can you access them from other classes? Given that the name of the class it resides in is called "Nathan" and the variable is called "age"Nathan.age;
  10. 10To use a static method in another class, does an object have to be instantiated? Can a "this" keyword be used in a static method?No
    No

Informações

Descrição
Masters Programming I FlashCards sobre OOP - Instance and Static Variables, criado por nhunsdale02 em 05-06-2014.
Criado por
nhunsdale02
Visualizações
16
Avaliação

Fale Conosco

Sobre o que é sua mensagem?

O que você acha do novo visual?

Você gostou?