That was a complete waste of time.
To sum it up: don't rely on the format of a generic toString() method. Prefer country.getName() over country.toString(), even if toString() returns getName().
To sum it up: don't rely on the format of a generic toString() method. Prefer country.getName() over country.toString(), even if toString() returns getName().
In the end, I just think there are better channels for getting started with programming in a particular language then this site.
I think that's a bit harsh. It's an article explaining simply, but effectively why you should probably not use toString(). Just because something can be summed up in a sentence does not make it a waste of time.