A Java string is a sequence of characters that exists as an object of the class java.lang. Java strings are created and manipulated through the string class. Once created, a string is immutable -- its ...
public String intern () – It returns the canonical form of the String object on which it is invoked. ” When the intern method is invoked, if the pool already contains a string equal to this String ...