File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Beginning Java and the fly likes toString() Method vs. Casting Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "toString() Method vs. Casting" Watch "toString() Method vs. Casting" New topic
Author

toString() Method vs. Casting

Gregg Bolinger
GenRocket Founder
Ranch Hand

Joined: Jul 11, 2001
Posts: 15286
    
    6

Is there a difference between the 2 following line?
String newString = someObject.toString()
and
String new String = (String)someObject;
Thanks.


GenRocket - A Test Data Generation Platform
Blake Minghelli
Ranch Hand

Joined: Sep 13, 2002
Posts: 331
We had a discussion about this a few months ago, check it out here


Blake Minghelli<br />SCWCD<br /> <br />"I'd put a quote here but I'm a non-conformist"
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: toString() Method vs. Casting
 
Similar Threads
Tech Word Game
date format with MS Access database
How to convert byte array into string array?
WA #1.....word association
ResultSet to Array