Friday, February 4, 2011

Datatype

//on DATA TYPES
class Datatype
{
public static void main(String args[])
{
int i=5;
float f=2.5F;
char ch='k';
String s="krish";
double b=1.5e5;
byte d=3;
boolean bo=true;
System.out.println(" DATA TYPES");
System.out.println("-----------------------------------");
System.out.println(i+"is interger type");
System.out.println(f+"is floate type");
System.out.println(ch+"is a char type");
System.out.println(s+"is string tyep");
System.out.println(b+"is a double type");
System.out.println(d+" is a byte type");
System.out.println(bo+" is boolean type");
}
}

No comments:

Post a Comment