Tutoriallearn.com
Easy Learning
Search Tutoriallearn.com :
byte a = 10;
short b=100;
int c = 20000;
long d = 200000;
float k = 12.5;
double l = 12356.67;
boolean n = True;
char p = 'A'; // Use single quotes symbol for enclosing character content.
class datatype {
public class static void main(String args[])
{
byte a = 10;
short b = 100;
int c = 20000;
long d = 200000;
float k = 12.5;
double l = 12356.67;
boolean n = True;
char p = 'A';
System.out.println("value of byte is " + a);
System.out.println("value of short is " + b);
System.out.println("value of int is " + c);
System.out.println("value of long is " + d);
System.out.println("value of float is " + k);
System.out.println("value of double is " + l);
System.out.println("value of boolean is " + n);
Syatem.out.println("value of char is "+ p);
}
}
value of byte is 10 value of short is 100 value of int is 20000 value of long is 200000 value of float is 12.5 value of double is 12356.67 value of boolean is True value of char is A