What is output by the following code segment? int x = 11; int y = 11; if (x != y ) { System.out.print("one"); } else if (x > y) { System.out.print("two"); } else if (y = x) { System.out.print("four"); } else { System.out.print("five"); }

Relax

Respuesta :

The output will be four because y and x are equal and that satisfies the condition for the else if statement that prints out four.