πŸ“Š JAVA
Q. What is the output of the Java program?
Code:
String name1="FOX", name2="DOG";
if(name1 == "FOX")
  System.out.print("FOX ");
  System.out.println("GOOD");					
if(name2 == "CAT")
  System.out.println("DINO");
  • (A) FOX DINO
  • (B) FOX GOOD DINO
  • (C) Compiler error
  • (D) None
πŸ’¬ Discuss
βœ… Correct Answer: (B) FOX GOOD DINO

You must be Logged in to update hint/solution

πŸ’¬ Discussion


πŸ“Š Question Analytics

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