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");
}
β
Correct Answer: (A)
RABBIT
int a=6, b=5;
if(++b == a--)
{
System.out.println("RABBIT");
}
else
{
System.out.println("BUNNY");
}
You must be Logged in to update hint/solution