top button
Flag Notify
    Connect to us
      Site Registration

Site Registration

What does intern() method do in java?

0 votes
335 views
What does intern() method do in java?
posted Mar 16, 2016 by anonymous

Share this question
Facebook Share Button Twitter Share Button LinkedIn Share Button

1 Answer

+1 vote

This method returns a canonical representation for the string object. It follows that for any two strings s and t, s.intern() == t.intern() is true if and only if s.equals(t) is true.

answer Mar 16, 2016 by Shubham Singh
...