Well, first of all it's "toString", not "tostring". But I don't see the problem. You already have some methods declared in the Location class. Now you want to declare another one. So just put the new method right after the existing ones. Why is there a question about that?
fred rosenberger wrote:You need to override the "toString" method in your Location class.
It's impossible for the JVM to know what you really want to print for a user-defined class. But since every class is a child of the Object class, they all inherit its implementation of that method, which basically prints the memory address (that hex code you see).
Create a toString method, and define what you want it to really print, and it should work.