class P07_ConversionTests { public static void main(String[] args) { byte b=1; short s=2; char c='c'; int i=4; long lg=5; float f=6; double d=7; //without information loss i=c; s=b; i=s; lg=i; d=i; d=f; //just lost precision f=i; f=lg; d=lg; //legal but data may lost c=(char)i; s=(short)b; s=(short)i; i=(int)lg; i=(int)d; f=(float)d; i=(int)f; lg=(long)f; lg=(long)d; } }