πŸ“Š JAVA
Q. What will be the output?
Code:
System.out.println("Java".equals(null));
  • (A) true
  • (B) false
  • (C) NullPointerException
  • (D) Compilation Error
πŸ’¬ Discuss
βœ… Correct Answer: (B) false

Explanation: equals(null) always returns false.

Explanation by: Roshan
equals(null) always returns false.

πŸ’¬ Discussion


πŸ“Š Question Analytics

πŸ‘οΈ
1
Total Visits
πŸ“½οΈ
6 d ago
Published
πŸŽ–οΈ
Roshan
Publisher
πŸ“ˆ
83%
Success Rate