This is not only for debugging / reading only people, it really depends on the context in which the object is used. For example, if you have a table that displays some X object, then you might want the table to display a readable textual representation of X, in which case you usually use the toString () method. This, of course, is a basic example, but there are many uses, in this case the implementation of toString () would be a good idea.
source share