How to use the toString method in Java?

Viewed 874416

Can anybody explain to me the concept of the toString() method, defined in the Object class? How is it used, and what is its purpose?

13 Answers
Related