What is Interning?
- Interning is the process of converting duplicated strings to shared ones.
- Interned Strings avoid duplicate strings.
- These strings have only one copy that can have many references point to it.
- It makes some string processing tasks more efficient.
-
Syntax:public String intern()