java tutorial - Java Strings intern() method - java programming - learn java - java basics - java for beginners
Learn Java - Java tutorial - Java strings intern - Java examples - Java programs
Description
The intern () method returns a canonical representation for a string object. It follows that for any two rows s and t, s.intern () == t.intern (), it is true if and only if s.equals (t) is true.
Syntax
Syntax method:
Detailed information about the parameters:
- This method does not accept any parameters by default..
Return value
- In Java, intern () returns a canonical representation for a string object.