package CastOperator;
public class CastOperator
{
static public void main(String[] args)
{
int x = 11, y = 5;
prln("x = "+x);
prln("y = "+y);
prln("Without Casting x/y = " +x/y);
prln("After Casting x/(float)y = " +x/(float)y);
}
static void prln(Object anyObject)
{
System.out.println(anyObject);
}
static void pr(Object anyObject)
{
System.out.print(anyObject);
}
}
0 comments:
Post a Comment