Posted by : Varada Rajulu Thursday, August 1, 2013

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.prin tln(x + " " + y);
}
}
A. 5 3 B. 8 2
C. 8 3 D. 8 5

Leave a Reply

Subscribe to Posts | Subscribe to Comments

Welcome to My Blog

Copyright © Software Sparkzz Inc- Designed by Rajesh Alwayzz - Powered by Blogger