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
How many types of threads are there in java?
How many bytes are a float?
What's the base class in java from which all classes are derived?
What are classloaders?
Can constructor be static or final?
Why map is used in java?
What is the latest version of java?
What is classpath?
What are methods in java?
What is pangram in java?
What is the size of a string in java?
What is array list in java?
How many decimal digits is 64 bit?
Can we assign null to double in java?
What is integer size in java?