Declarations Revisited
Declarations have the form:
type name ;
Example:
int count;
Account account1;
Account account2;
The initial value of a variable depends on its type
int variables: 0
non-primitive values: null
Value null signifies that no object is referenced. It can be stored in a variable of any class type
Previous slide
Next slide
Back to first slide
View graphic version