πŸ“Š JAVA
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
πŸ’¬ Discuss
βœ… Correct Answer: (A) FOREST

You must be Logged in to update hint/solution

πŸ’¬ Discussion


πŸ“Š Question Analytics

πŸ‘οΈ
260
Total Visits
πŸ“½οΈ
4 y ago
Published
πŸŽ–οΈ
Ram Sharma
Publisher
πŸ“ˆ
91%
Success Rate