Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

what is the difference between equals method and ==

Answer Posted / r ramya

== checks the string value
equals for checking the strinhg object
String s1="hai";
String s2=new String("hai");
sop(s1==s2);//false
sop(s1.equals(s2));//true

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Give me an example of array and linked list? Where they can be used?

1011


What is the difference between length and length() method in java?

1121


What is meant by memory leak?

1078


Which method returns the length of a string?

1041


What are the different types of sorting in java?

980


Which keyword specify that a variable is effectively final ?

996


What is double parsedouble in java?

1053


Can we override final method?

1013


Why you should not use singleton?

983


Does java support Operator Overloading?

1046


How to solve the problem of generating the unique hash keys with hash function?

1916


What is difference between Heap and Stack Memory?

1054


Why strings in java are called as immutable?

993


What kind of variables can a class consist?

1060


What causes memory leaks in java?

940