Classes Presentation
Classes Presentation
VARIABLES
• Consider the following statement:
int x = 45;
• In this declaration memory space is
allocated to store an int value and this
memory space is called x.
• The variable x can store an int value in its
memory space.
45
x
variable x and its data
String str = new String(“Java progamming”);
• Variable str cannot store directly store
data in its memory space.
Names of classes
The names of classes are written in capitals and that of
methods and objects in lowercase letters.
Two Methods in a class
ON CLASSES