Given the code fragment:
Which three lines fail to compile?
A. Line 7
B. Line 8
C. Line 9
D. Line 10
E. Line 11
F. Line 12
Given the code fragment:
Which three lines fail to compile?
A. Line 7
B. Line 8
C. Line 9
D. Line 10
E. Line 11
F. Line 12
ADF
public static void main(String[] args) {
int ivar = 100;
float fvar=100.100f;
double dvar = 123;
ivar=fvar;//not compile until cast to (int)
fvar=ivar;
dvar=fvar;
fvar=dvar;//not compile until cast to (float)
dvar=ivar;
ivar=dvar;//not compile until cast to (int)
}
the small cannot contain the big primitives
The correct answer is ADF
AEF is the correct answer