Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class TypeCasting1
- {
- public static void main(String[]args)
- {
- float a=12.35f;
- double b=(double)a;
- double d=123.456789;
- float c=(float)d;
- float e=51.34f;
- int g=(int)e;
- int p=54;
- float q=(float)p;
- System.out.println(b);
- System.out.println(c);
- System.out.println(g);
- System.out.println(q);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement