Professional Documents
Culture Documents
Class
It is a collection of data members, member functions constructors and code blocks.
Class also contains different objects.
Variables
• It is a piece of memory which I used to store information.
1)
int a;
int a = 10;
a = 10;
2)
String b;
String b = “Velocity Classes”;
b = “Velocity”;
Data type
• Data type are used to represent type of data or information which we are going
to use in our java program.
Types
1) Primitive datatype (Keyword)
bit
bit
bit
bit
bit
bit
Example
Storage Capacity of byte
0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 1
0 0 0 0 0 0 1 1
0 0 0 0 0 0 1 0
-128 127
0
Example
1) Arithmetic operator (Mathematical function that takes two operands and perform action on them)
1) Arithmetic operator
• Addition +
• Subtraction -
• Multiplication *
• Division /
• Mod %
• Increment ++
• Decrement --
2) Logical operator
3) Relational operator