String and Immutable

Dear Sir,
It is said that string are immutable.
But can i print reference of location where string are location in intern pool.
In this way I can make sure the concept taught is practical.
Thank You

Hello Mohit,
You can use this code to get string address Integer.toHexString(s.hashCode()) as address of any object is basically a hash code.

Hey Mohit, as you are not responding to this thread, I am marking your doubt as Resolved for now. Re-open it if required.

Please mark your doubts as resolved in your course’s “ Ask Doubt ” section, when your doubt is resolved.