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
What is the exact difference in between unicast and multicast object? Where we will use?
What is the purpose of extern variable?
Program to Find the second largest element in an array.
What are parsing rules?
Why arraylist is not synchronized in java example?
Why hashmap is used in java?
What is method overloading in java ?
What does localhost mean?
Can a static block throw exception?
What is a numeric string?
What is the difference between post and put?
What is a flag value?
what is bmg file and how to create that files?what will it contailn?
Does sprintf allocate memory?
What is command line used for?