Which of the following statements in Java will compile and execute…

BEL Probationary Engineer 2025

Which of the following statements in Java will compile and execute successfully without violating keyword usage rules?

  1. A.

    boolean null = false; System.out.println(null);

  2. B.

    float goto = 2.5f; System.out.println(goto);

  3. C.

    int static = 10; System.out.println(static);

  4. D.

    int _for = 5; System.out.println(_for);

Attempted by 34 students.

Sign up free to check your answer

Sign up free

Explore the full course: Isro

Loading lesson…