Q. What is the output of Java code snippet below?

Code:
final int a = 25, b=33;
String name = !true?"Dino":"Tom";
System.out.println(name);
  • (A) Empty
  • (B) Dino
  • (C) Tom
  • (D) Compiler error
πŸ’¬ Discuss
βœ… Correct Answer: (C) Tom

You must be Logged in to update hint/solution

πŸ’¬ Discussion


πŸ“Š Question Analytics

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