Posted On: Feb 22, 2018
As indicated by Oracle records, when the intern methodology is summoned, if the String steady pool as of now contains a string equivalent to the String object as controlled by the equals(Object) technique, at that point the string from the pool is returned. Generally, the String object is added to the pool and a reference to the String object is returned. The errand of intern() technique is to put String (that is passed to the intern methodology) into the string steady pool.
Never Miss an Articles from us.
With respect to Java, a String can be attributed internally by a variety of byte esteems..