Hi, I was wondering how a person convert an object to a string. I've tried casting, but it doesn't work. I'm calling a function from a java file that I wrote. It returns a string, but I can't say "String kevin = newName;", it doesn't work. What can I do? TIA. Kevin
Joined: Sep 10, 2001
Hi, every class you create is derived from the class Object, the class Object has a method toString(). So therefore once you create an instance of that class you can call the toString() method. Here's an example, hope this helps.
Danny [This message has been edited by Danny Davies (edited September 10, 2001).]
Joined: May 17, 2001
It should work just fine. You may need to provide more detail if it still does not work.