I know that toString
is called in Java
whenever we print an object, and that is by default defined in Object
class which is superclass of all classes.
But, my teachers says that toString
is also called when we print some primitive type
(int, char
etc).
Is that true ?