Question 10
Back to Exercise
What does System.out.println(obj) print for a class that does not override toString?
- A All field values
- B The class name, @ and a hexadecimal hash code Correct
- C Nothing
- D Compile error
Correct Answer: Option B
For example Product@1b6d3586.
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!