Live quiz

java - Part 25

Question 1 of 25 Hints left: 3
Q1

Consider the following program written in Java. class Test{ public static void main(String args[]){ int x=7; if(x==2); // Note the semicolon System.out.println("NumberSeven"); System.out.println("NotSeven"); } } What would the output of the program be?

  • A
  • B
  • C
  • D