Today we will explain primitive data types , arithmetic operators and variables in java
Data types :
byte, short, int and long data types are used for storing whole numbers.
float and double are used for fractional numbers.
char and string which are used for storing characters(letters).
- local variables : which are defined inside some method's body
- instance variables : which are defined out side method body , but in side class body
- static variables : which are defined by using "static" word before we defined them , and they can not be defined inside method body
public static void main(String[]args){
int num = 10;
System.out.println("________________________");
System.out.println();
System.out.println(" "+num+" * 1 "+" = "+num*1);
System.out.println(" "+num+" * 2 "+" = "+num*2);
System.out.println(" "+num+" * 3 "+" = "+num*3);
System.out.println(" "+num+" * 4 "+" = "+num*4);
System.out.println(" "+num+" * 5 "+" = "+num*5);
System.out.println(" "+num+" * 6 "+" = "+num*6);
System.out.println(" "+num+" * 7 "+" = "+num*7);
System.out.println(" "+num+" * 8 "+" = "+num*8);
System.out.println(" "+num+" * 9 "+" = "+num*9);
System.out.println(" "+num+" * 10 "+" = "+num*10);
System.out.println(" "+num+" * 11 "+" = "+num*11);
System.out.println(" "+num+" * 12 "+" = "+num*12);
System.out.println();
System.out.println("_________________________");
System.out.println();
System.out.println();
System.out.println();
}
}