A
Q. What is the output of the Java code snippet?
Code:
int a=6, b=5;
if(++b == a--)
{
System.out.println("RABBIT");
}
else
{
System.out.println("BUNNY");
}
if(++b == a--)
{
System.out.println("RABBIT");
}
else
{
System.out.println("BUNNY");
}
- Correct Answer - Option(A)
- Views: 24
- Filed under category Java
- Hashtags:
Discusssion
Login to discuss.