Posted On: Dec 18, 2020
In Java, intern() is a native method of the String class. The String.intern () returns a reference to the equal string literal present in the string pool. The intern () method is applicable to String objects created via the 'new' keyword. When it is executed then it checks whether the String equals, this String object in the pool or not.
Never Miss an Articles from us.
Different types of Classes available in Java are as follows:Concrete class Abstract class Final class Static class Inner ClassConcrete class In Java, A concrete class is a type of subclas...