View RSS Feed

Java String

All about Java String.

  1. The difference between == and equals()

    by , 04-26-2012 at 07:31 PM
    The == operator:
    References are compared by == operator, of the 2 objects which are present in memory. When these 2 objects are pointing similar memory location, then it returns true. It shall be remembered that in java strings are immutable therefore if string variables “str1” is present along with “abc” value and then another variable along with other value is created, instead of new string variable creation with same value, then Java simply would be pointing str2 to similar location of ...
    Tags: equals() Add / Edit Tags
    Categories
    String