Overriding <code>toString()</code> lets you
- A
Make object immutable
- B
Allow reflection
- C
Modify private state
- Dcheck_circle
Customize how the object prints
Explanation
<code>System.out.println(obj)</code> uses the custom toString.
AP Computer Science A· difficulty 4/5
Overriding <code>toString()</code> lets you
Make object immutable
Allow reflection
Modify private state
Customize how the object prints
Explanation
<code>System.out.println(obj)</code> uses the custom toString.
Want 10 more like this — adaptive to your weak spots?