Answer Posted / suman
The == operator works on String object references. If two
String variables point to the same object in memory, the
comparison returns a true result.
The equals method compares the actual char content of two
strings. This method returns true when two String objects
hold char data with the same values.
| Is This Answer Correct ? | 4 Yes | 3 No |
Post New Answer View All Answers
What mechanism does java use for memory management?
What do you understand by casting in java language?
Why do we declare a class static?
Can a class extend more than one class?
What is the difference between static and global variables and also define what are volatile variables?
Do I need java on my pc?
What is boolean data type in java?
What is a Hash Table? What are the advantages of using a hash table?
What is a type parameter in java?
What is protected in java?
What is a default constructor and also define copy contrucyor?
How is java hashmap implemented?
Why do we need data serialization?
Is string a class in java?
What is class and object in java?