Why is string emulated in Java? - ProProfs Discuss
Advertisement

Why is string emulated in Java?

Asked by Mike John, Last updated: Apr 18, 2024

+ Answer
Request
Question menu
Vote up Vote down

1 Answer

Perry Shelly

Perry Shelly

Hi Everyone! I, am Perry Shelly. I am a Programming developer in Javatpoint portal. JavaTpoint Provides free tutorial

Perry Shelly
Perry Shelly, Java Tutorial

Answered Aug 08, 2020

The String is Immutable in Java because String objects are stored in the String pool. Since stored String literals are shared between various customers, there is consistently a hazard where one customer's activity would influence all another customer. Since reserving of String, objects were significant from execution reason this hazard was evaded by making String class Immutable.

The String is Immutable in Java because String objects are stored in the String pool. Since stored

Simultaneously, String was caused last so nobody can bargain invariant of String class, for example, Permanence, Caching, hashcode figuring, and so on by expanding and abrogating practices.

upvote downvote
Reply 

Advertisement
Advertisement
Search for Google images Google Image Icon
Select a recommended image
Upload from your computer Loader
Image Preview
Search for Google images Google Image Icon
Select a recommended image
Upload from your computer Loader
Image Preview
Search for Google images Google Image Icon
Select a recommended image
Upload from your computer Loader

Email Sent
We have sent an email to your address "" with instructions to reset your password.