Wednesday, 27 August 2014

Program to assign/Access Values of class

/*program understanding concept regarding accessing and assigning values in classes */

Class Rectangle{
int length,width;
void getData(int x,int y){
length=x;
width=y;
}
int Area(){
return(length*width);
}
}
   Class RectArea{
   public static void main(string args[]){
   Rectangle rect1=new Rectangle();
   Rectangle rect2=new Rectangle();
   int area1,area2;
   rect1.length=15;
   rect1.width=10;
   area1=rect1.length*rect1.width;
      rect2.getData(12,13);
      area2=rect2.Area();
System.out.println("1st Area of Rectangle" +area1);
System.out.println("1st Area of Rectangle" +area2);
}
}

Thursday, 21 August 2014

JAVA TOKENS

Java program is made up of collection of classes.A class is defined by the set of declaration statements and methods containing executable statements. Most statements contain expressions, which describe the actions carried out on data.SMALLEST INDIVIDUAL UNIT IN A PROGRAM ARE KNOWN AS TOKENS
The compiler recognizes them for building up expressions and statements.
Java language includes five types of tokens.They are 
  • Reserved keywords
  • Identifiers
  • Literals
  • Operators
  • Separators

Knowing Anything in Advance

This Blog will provide all the necessary material / Information to the Fans and Friends like
Educational
Books
Entertainment
Religious
Clothing
Fasion
Travels
Destinations
Climates
Electronics
and every Information as well as Material is 100% authentic by every means.