what is the difference between equals method and ==
Answer Posted / devarathnam c,kotagudibanda(po
Hi...
"equals()" method always compares the content of an
object,but "==" operator compares the memory locations
(references).
eg: String s1="KOTAGUDIBANDA";
Where "s1" is a reference and "KOTAGUDIBANDA"is a content.
Is This Answer Correct ? | 6 Yes | 6 No |
Post New Answer View All Answers
Why does it take so much time to access an applet having swing components the first time?
What is difference between classpath and path variables in java?
How to compare two strings in java program?
What languages are pass by reference?
Can a class with private constructor be extended?
Can an interface be final?
Why singleton pattern is better than creating singleton class with static instance?
What are benefits of java?
take an array with -ve and +ve value both.find out the nearest value of 0(zero).if two values are same like(-2 and +2)then extract +2 is nearest of 0(zero).
Where is java located?
Explain the access modifiers for a class, method and variables?
What is stored procedure. How do you create stored procedure ?
Which keyword specify that a variable is effectively final ?
how does multithreading take place on a computer with a single cpu? : Java thread
What is the difference between this() and super() in java?