Header Ads

  • Breaking Now

    How is '==' different from .equals() method in case of String objects?

    In case of String objects:

    '==': does reference check

    while .equals() method: checks the contents of the two String objects.

    The following example will illustrate the difference between the two:

    No comments

    Post Top Ad

    Post Bottom Ad