Q. What is the output of the Java program?
Code:
int horses = 10;
int camels = 5;
if(horses > 5)
{
if(camels > 3)
{
System.out.println("FOREST");
}
}
else
{
System.out.println("CITY");
}
β
Correct Answer: (A)
FOREST