[quote]‘location.toString()’ gives me “class world.World”
[/quote]
The default behavior of the ‘toString()’ method is return a string like ‘world.World@e38b2a’ where the number (in hex) is the memory address of the object.
In your case the string returned is the call to java.lang.Class’ toString() method.
Your world class code may be:
class World extends Class{
...
}
but it should be just:
class World{
...
}
until you want to inherit something from the class ‘Class’.
Remember that in Java all clases extends from Object (by default, you don’t need to explicitly put the ‘extends Object’ statement.
Rafael.