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
Why do we need hashset in java?
How many techniques can be employed to create a string object?
How many unicode characters are there?
Is array size fixed in java?
What is the difference between the ">>" and " >>>" operators in java?
What is string [] args?
How to declare objects of a class ?
what are synchronized methods and synchronized statements? : Java thread
How are multiple inheritances done in Java?
How many boolean functions are there?
What are different access specifiers in java?
What is void data type?
Can we write a class without main method in java?
Is it possible to write a regular expression to check if string is a number?
What is the method to declare member of a class static?