Use LEFT and RIGHT arrow keys to navigate between flashcards;
Use UP and DOWN arrow keys to flip the card;
H to show hint;
A reads text to speech;
29 Cards in this Set
- Front
- Back
What are the 2 properties of Objects?
|
State and Behavior
|
|
What is State?
|
information stored within the object
|
|
What is Behavior?
|
operations that can be performed on the object
|
|
What is an Instance Variable or Field?
|
Variables that describe the State of the Object
|
|
What is an Instance Method?
|
possible Behavior on the Object
|
|
Instance Variables store single values
True or False? |
False, Instance Variables can also store entire objects
|
|
An Instance Method can require arguments and return variables
True or False |
True
|
|
An Instance Method can examine and change the variables stored in an Object's Instance Variables
True or False |
True
|
|
What is a Class?
|
The group of Instance Variables and Instance Methods that belong to a particular kind of object
|
|
What is a Class Declaration?
|
declarations of instance variables and instance methods
|
|
What are Constructors?
|
These methods initialize objects
|
|
The order of declarations usually matters
True or False |
False
|
|
Define Access Modifier
|
is either "public" or "private" and determines whether other classes can access the entity or not
|
|
It is common for variables to be private, but constructors and instance methods to be public
True or False |
True
|
|
A "public" instance variable is an example of Information Hiding
True or False |
False, "private"
|
|
What are the parts of an instance method declaration?
|
Access modifier
Result type. If no value is returned, the result type is void Method name Parameters Body |
|
Define Overloading
|
when a class contains more than one method with the same name
|
|
What is it called when a class contains more than one method with the same name?
|
Overloading
|
|
In order for methods to be overloaded, what is required of the multiple methods?
|
The number or types of parameters are different
|
|
A Constructor is similar to an instance method, but has no result type and has the same name as the class
True or False |
True
|
|
a Class may only have one Constructor
True or False |
False
|
|
an object can be described as an Instance of a Class
True or False |
True
|
|
newly created Objects can be stored in a variable whose type matches the Object’s Class
True or False |
True
|
|
the variable created whose type matches the Object's Class contains the Object
True or False |
False, the variable contains a Reference to the Object, but not the Object itself
|
|
what keyword creates an Instance of the Class to be created?
|
new
|
|
what is the form of an Instance Method Call on an Object?
|
object . method-name ( arguments )
|
|
what is the sequence when an instance method is called?
|
The program “jumps” to that method
The arguments in the call are copied into the method’s corresponding parameters The method begins executing When the method is finished, the program “returns” to the point at which the method was called |
|
how would you compile a program with multiple classes?
|
javac Account.java
javac TestAccount.java Account and TestAccount are only examples |
|
when a program compiles multiple classes, it is necessary for the user to compile each dependent class
True or False |
False, if a .java file has been altered since the compilation then javac will recompile the file automatically. The compiler will also look for files that are necessary
|