tg-me.com/topJavaQuizExplain/96
Last Update:
What will be output for the code?
❌ A. Compilation error
❌ B. RuntimeException:ArithmeticException: / by zero
❌ C. First
✅ D. Second
❌ E. None of the mentioned
Explanation:
In the above program we are using && operator (short-circuit operator). Whenever we use && operator then if the first condition is false then the control does not go to the 2nd condition whether it is true or false. In the above program, the first condition in the if block is not true that’s why the else part is executed.
BY Explanations “Top Java Quiz Questions”
Warning: Undefined variable $i in /var/www/tg-me/post.php on line 283
Share with your friend now:
tg-me.com/topJavaQuizExplain/96