A

Admin • 825.56K Points
Coach

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");
}
  • (A) FOREST
  • (B) CITY
  • (C) Compiler error
  • (D) None
  • Correct Answer - Option(A)
  • Views: 8
  • Filed under category Java
  • Hashtags:

No solution found for this question.
Add Solution and get +2 points.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.