Sunday, February 3, 2008

JAVA Lesson 2

Variable declaration:
Syntax : variable_data_type identifier;
Example : int number;
String name;


Variable initialization:
Syntax : identifier = value;
Example : number = 5;
name = "your_name";


Declaring and initializing at the same line
Syntax : variable_data_type identifier = value;
Example : int number = 5;
String name = "your_name";

No comments: