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
Why are the objects immutable in java?
how does multithreading take place on a computer with a single cpu? : Java thread
Which non-unicode letter characters may be used as the first character of an identifier?
Is array an object in java?
Can we have more than one package statement in the source file?
How big is a 64 bit float?
What are the different types of data structures in java?
Is heap stored in ram?
Write a java program that prints all the values given at command-line.
What is thread start?
What classes of exceptions may be thrown by a throw statement?
What is a priority queue java?
Can I learn java without any programming experience?
Can we override constructor in java?
What is the purpose of the System class?