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)- A6% (2)
- B79% (27)
- C12% (4)
- D3% (1)
Community Discussion
No community discussion yet for this question.