Which code fragment cause a compilation error?
A.
float flt = (float) 1_11.00;
B.
int y2 = 100; floatflt = (float) y2;
C.
flat flt = 100F;
D.
float flt = 100;
E.
double y1 = 203.22; floatflt = y1
Which code fragment cause a compilation error?
Which code fragment cause a compilation error?
A.
float flt = (float) 1_11.00;
B.
int y2 = 100; floatflt = (float) y2;
C.
flat flt = 100F;
D.
float flt = 100;
E.
double y1 = 203.22; floatflt = y1
D not A, tried it.
You cannot compile without converting from double to float.
E
E
E
TESTED