Join WhatsApp Icon CAT WhatsApp Group
Question 64

Whatis the output of the following Java program?
Class Test
{
public static void main (String [] args)
{
int x = 0;
int y = 0;
for (int z = 0; z <5; z++)
{
if((++x > 2) || (Hy > 2))
{
x+H+;
}
}
System.out.printIn( x +" + y);
}
}

Create a FREE account and get:

  • Download Maths Shortcuts PDF
  • Get 300+ previous papers with solutions PDF
  • 500+ Online Tests for Free