
Please explain me the working of intern().

Hello Friend,
You can compare String objects and string characters by using the method intern(). It is much faster than equals() method.
For more information, visit the following link:
Thanks
If you are facing any programming issue, such as compilation errors or not able to find the code you are looking for.
Ask your questions, our development team will try to give answers to your questions.