¡GoConqr estrena diseño! Cuéntanos qué te parece.

Fichas

OOP - Instance and Static Variables

nhunsdale02 Programming I Masters Inglés 10 fichas

Fichas del 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

Información

Descripción
Masters Programming I Fichas sobre OOP - Instance and Static Variables, creado por nhunsdale02 el 05/06/2014.
Creado por
nhunsdale02
Visitas
16
Valoración

Escríbenos

¿Sobre qué es tu mensaje?

¿Qué te parece el nuevo diseño?

¿Te gusta?