Java String intern() Method
A string object in the string constant pool is called a String Intern. We can create an exact copy of the heap memory string object in a string constant pool. intern(): Returns a canonical representation for the string object. Syntax: publicĀ StringĀ intern() Note: It returns a string that has the same contents as this … Read more