How can i convert a string object to string pool object?

Hitendra

I have one object of String as new String("abc"); How will i convert that object to String pool Object

TheLostMind
   String str=  new String("abc").intern() // calling intern() will add the String object to the String pool. 

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

How can I convert a string to char[] without copying the object?

How can I know if Object is String type object?

How can I convert ArrayList<Object> to ArrayList<String>?

How do I convert String to an Object in MongoDB?

Java: Can I convert List of Object to List of String[] and vice versa?

How will i convert json string to Json Object

Scrapy - how to convert string into an object which I can use XPath on?

Integer to String, How can I fix the following error: "TypeError: Can't convert undefined to object"?

How do I convert a string to an object

how can I pass a json string to object?

How can I convert a string of bytes to a byte object

How can I convert a string to object in Javascript?

How can I convert IList<object> to string array?

How can I convert object keys & values to formatted string?

How do I convert a string into a Time object?

How can i access stdClass Object as a string

How can I convert this string to a javascript Date object?

How can I change the string object inside a string object?

How can I parse this string into a searchable object?

How can I append a string to an object property?

How can I convert an object to a string (Twig & Symfony)?

How can i convert an object to the structure { [param: string]: string | string[] }?

Convert string "object" to object

How can I get a string as a Type object?

How can I convert JSON-like string to PowerShell object?

How can i convert an array in Json string to c# object?

How to convert String to Set<Object>?

I can't convert a string object to string in Python

How can I convert a single object of a json string into a .Net object?