Live quiz

java - Part 17

Question 1 of 25 Hints left: 3
Q1

What will be the output of the following Java code? class Output { public static void main(String args[]) { int x , y = 1; x = 10; if (x != 10 && x / 0 == 0) System.out.println(y); else System.out.println(++y); } }

  • A
  • B
  • C
  • D