What will be the output of the 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 ) || (++y >
2))
{
x++;
}
}
System.
out.
println(x + " " + y);
}
}

5 3
 
8 2
 
8 3
 
8 5
 

Answer

A Foxoyo User

Statistics

0 Level
0
Attempts
0
Accuracy
0
Bookmark
0
Tags

Quizes

Related Questions