Which three lines fail to compile?

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

Download Printable PDF. VALID exam to help you PASS.

3 thoughts on “Which three lines fail to compile?

  1. 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=dvar;//not compile until cast to (float)
    ivar=dvar;//not compile until cast to (int)

    the small cannot contain the big primitives

Leave a Reply

Your email address will not be published. Required fields are marked *

The reCAPTCHA verification period has expired. Please reload the page.