Get ahead with a $300 test prep scholarship
| Enter to win by Tuesday 9/24
Introduction to Java Programming
Terms in this set (13)
Objects have states and behaviors. Example: A dog has states - color,
name, breed as well as behaviors - wagging the tail, barking, eating. An object is
an instance of a class.
A class can be defined as a template/blueprint that describes the
behavior/state that the object of its type supports.
A method is basically a behavior. A class can contain many methods.
It is in methods where the logics are written, data is manipulated and all the
actions are executed.
Each object has its unique set of instance variables. An
object's state is created by the values assigned to these instance variables.
Java is case sensitive, which means
identifier Helloand hello would have different meaning in Java.
For all class names the first letter should be in Upper Case.
All method names should start with a Lower Case letter.
Program File Name
Name of the program file should exactly match the class
All Java components require names. Names used for classes, variables, and methods are
Like other languages, it is possible to modify classes, methods, etc., by using modifiers.
There are two categories of modifiers:
default, public , protected, private
Following are the types of variables in Java:
Class Variables (Static Variables)
Instance Variables (Non-static Variables)
Arrays are objects that store multiple variables of the same type.