Friday, August 26, 2011

TypeCasting in java


//Type casting example .
public class TypeCasting
{
public static void main(String args[])
{
int i = 19;
float f = (float) i;

System.out.println("i=" + i);
System.out.println("f=" + f);
}
}


Output=>
i=19
f=19.0

No comments:

Post a Comment