Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

Why are strings immutable in Java?

Answer Posted / hrindows@gmail.com

Strings in java are frequently used for hashmap keys. Now if someone changes the value of the string it will cause severe discrepancies. Hence strings are made immutable.

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Is null a value?

1040


What is unmodifiable collection in java?

925


Why are the destructors for base class and derived class called in reverse order when the program exits

2211


What does nextint () do in java?

988


What is append function?

1003


What is the size of int?

1085


What is static class

1117


What are the 8 data types in java?

995


Can a final variable be initialized in constructor?

971


Explain what access modifiers can be used for variables?

1060


What is the difference between a checked and an unchecked exception?

996


What is qualitative variable?

928


Give the difference between the println method and sqrt method?

1086


What is :: operator in java 8?

1022


Differece between class and generic class?

1044