Front | Back |
Class ?
|
A template that describes the kinds of state and behavior that objects
of its type support. |
Object ?
|
At runtime, when the Java Virtual Machine (JVM) encounters the
new keyword, it will use the appropriate class to make an object which is an instance of that class. That object will have its own state, and access to all of the behaviors defined by its class. |
State (instance variables)
|
Each object (instance of a class) will have its
own unique set of instance variables as defined in the class. Collectively, the values assigned to an object's instance variables make up the object's state. |
Behavior (methods)
|
When a programmer creates a class, she creates methods
for that class. Methods are where the class' logic is stored. Methods are where the real work gets done. They are where algorithms get executed, and data gets manipulated. |
Inheritence
|
Allows the code in one class to be reused in other class.
|
Superclass
|
General class (more abstract), that will be extended by subclasses.
|
Subclass
|
Extends a superclass. By inheriting from superclass, a subclass is automatically given accessible methods defined by superclass, but is also free to override superclass bethods.
|
Legal identifier MUST start with what?
|
-a letter
-a currency character -a connecting character (underscore...) |
After the first charcter, an identifier can contain any combination of letters, currency characters, numbers, connecting characters... TRUE/FALSE
|
TRUE
|
Is there a limit to the number of characters an identifier can contain?
|
No
|
Can you use a Java keyword as an identifier?
|
No
|
Are identifiers case-sensitive in Java?
|
Yes
|
Naming the classes and interfaces, should yuo capitalize the first letter?
|
Yes
|
Naming the method, shoul you capitalize the first letter?
|
No (you should use the camelCase)
|
What naming format should be used in naming variables?
|
CamelCase
|