Q. What is the output of Java code snippet?
Code:int a=5, b=10;
if(++b>10||a++=5)
{
System.out.println("PIZZA="+a);
}
else
{
System.out.println("BURGER="+a);
}
β
Correct Answer: (A)
PIZZA=5
int a=5, b=10;
if(++b>10||a++=5)
{
System.out.println("PIZZA="+a);
}
else
{
System.out.println("BURGER="+a);
}
You must be Logged in to update hint/solution