nerdexam
Oracle

1Z0-815 · Question #73

What is the result? boolean log3 = ( 5.0 != 6.0) && ( 4 != 5); boolean log4 = (4 != 4) || (4 == 4); System.out.println("log3:"+ log3 + \nlog4" + log4);

The correct answer is B. log3:true. See the full explanation below for the reasoning.

Question

What is the result? boolean log3 = ( 5.0 != 6.0) && ( 4 != 5); boolean log4 = (4 != 4) || (4 == 4); System.out.println("log3:"+ log3 + \nlog4" + log4);

Options

  • Alog3:false
  • Blog3:true
  • Clog3:true
  • Dlog3:false

How the community answered

(34 responses)
  • A
    6% (2)
  • B
    79% (27)
  • C
    12% (4)
  • D
    3% (1)

Community Discussion

No community discussion yet for this question.

Full 1Z0-815 Practice