Java String intern

The java string intern() method returns the interned string. It returns the canonical representation of string.

It can be used to return string from pool memory, if it is created by new keyword.


The signature of intern method is given below:

public String intern()


interned string

Java String equals() method example

Flash soon

Copyright 2017 Design& Development