Every Java beginners must know about toString() method of java.lang.Object class. As you know java.lang.Object is the super most class in Java. Every pre-defined and user-defined class can override the methods available in the class java.lang.Object. Of these, toString() method plays a vital role. See the following example: int x = 100; System.out.println(x); This will …
Tag: methods of java.lang.Object
Permanent link to this article: https://blog.openshell.in/2010/11/make-use-of-tostring-in-java/