Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / October 2006

Tip: Looking for answers? Try searching our database.

difference between toString() and type casting a n Object to String

Thread view: 
narsing - 23 Oct 2006 05:02 GMT
what is the difference between toString() and type casting a n Object
to String
Danno - 23 Oct 2006 05:23 GMT
> what is the difference between toString() and type casting a n Object
> to String

Try it. Three lines is all it takes:

Integer mynum = new Integer(4);
System.out.println(mynum.toString());
System.out.println((String) mynum);
Thomas Weidenfeller - 23 Oct 2006 08:24 GMT
> what is the difference between toString() and type casting a n Object
> to String

What was wrong with the answers you got in
http://groups.google.com/group/comp.lang.java.programmer/browse_thread/thread/1c
c7ccbaed58588f/d1e3851848fcafcd


Not enough spoon feeding?

/Thomas
Signature

The comp.lang.java.gui FAQ:
http://gd.tuwien.ac.at/faqs/faqs-hierarchy/comp/comp.lang.java.gui/
ftp://ftp.cs.uu.nl/pub/NEWS.ANSWERS/computer-lang/java/gui/faq



Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.