File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes equals( ) method from String class Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "equals( ) method from String class" Watch "equals( ) method from String class" New topic
Author

equals( ) method from String class

mrudul joshi
Ranch Hand

Joined: Nov 12, 2003
Posts: 54
Hi everybody,
I want to know whether the following method
boolean equals (Object obj)
throws the ClassCastException if the argument object is not of class String or does the language itself converts non-string object into its string representation internally?
Thanks in advance for your inputs.
Mrudul
Harsha Kalva
Greenhorn

Joined: Dec 23, 2003
Posts: 1
String.equals(Object) returns false if Objects is not a String


calva
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: equals( ) method from String class
 
Similar Threads
Comparing String with StringBuffer
string quest
Mock Question on StringBuffer
== / equals()!!!
String and StringBuffer class