This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
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
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).]