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
Give me an example of array and linked list? Where they can be used?
What is the difference between length and length() method in java?
What is meant by memory leak?
Which method returns the length of a string?
What are the different types of sorting in java?
Which keyword specify that a variable is effectively final ?
What is double parsedouble in java?
Can we override final method?
Why you should not use singleton?
Does java support Operator Overloading?
How to solve the problem of generating the unique hash keys with hash function?
What is difference between Heap and Stack Memory?
Why strings in java are called as immutable?
What kind of variables can a class consist?
What causes memory leaks in java?