It is fine that the println method of PrintStream is overloaded for each primitive types and also the Object reference. But why do we need another overloaded println method for String when we already have one for Object ? I understand that String is an Object in Java. Doesn’t void println(Object x) make void println(String x) unnecessary ?
Joined: Jul 03, 2001
There is a call x.toString() in println(Object x) that is not needed in println(String x) A little speed gain, or for completeness?