Well you are going to have a heck of a time getting ANY answer unless you give us some hint about WHAT CLASS you want to know about the toString() method of. There are about 4 zillion classes that have that method, and the answer changes depending on the class.
However as an example: int i = 1232354345; String s = Integer.toString(i); Now s has a string representation of the integer value. So what class did YOU want to know about?
"JavaRanch, where the deer and the Certified play" - David O'Meara
Hi Noman, Since Cindy gave you a great example, I will provide the complete details. Since I tire easily, I will only give details on about 200-300 class (out of Cindy's 4 zillion). Maybe if you keep asking you can start a good collection. If you actually get all 4 zillion you get a new Mercedes (so I heard!). Complete Details Happy Reading! Manfred.
Hi , Noman In response to your question i want to go on basics, Every class is extended from Object class implictly , and Object class has toString method so every class has a toString method. While calling toString method using objects of any class returns String representation of that class. whenever you print an object on console it's imlicit tostring method is called and returned value of toString method is printed on console.
Class Object is the root of the class hierarchy. Every class has Object as a superclass. All objects, including arrays, implement the methods of this class. The toString() method returns a string representation of the object.
Cheers,<br />Rani<br />SCJP, SCWCD, SCBCD
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com