*
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


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
 
GeeCON Prague 2014
 
subject: equals( ) method from String class