Question 17
Back to Exercise
What does Long.valueOf(5).equals(5) return?
- A true
- B false – 5 is boxed to Integer, and Long.equals only accepts Long Correct
- C Compile error
- D NullPointerException
Correct Answer: Option B
Write equals(5L).
Discussion & Comments 0
Share your method, a shortcut, or ask about a step you didn't follow.
No comments yet. Be the first to share your solution!