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...

hi to all. well can you please tell me that why String class
is immutable?

Thanks in advance.

Answer Posted / hari

Well it is immutable because of the memory concern. For
every new string if there is new object then it will take
lot of memory and if there is such requirement then there
is StringBuffer class provided.

Is This Answer Correct ?    2 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the difference between the file and randomaccessfile classes?

1163


What are pass by reference and pass by value?

1040


What modifiers may be used with an inner class that is a member of an outer class in java programming?

1174


how are methods defined?

1107


What technique is carried out to find out if a particular string is empty?

1062


Explain about serializable interface in java?

1051


What is a super method?

1022


What is udp in java?

1045


What are the object and class classes used for?

1092


Write code to implement bubble sort in java?

1050


What are triggers in DB? Explain their types. How do they work?

1139


design an lru cache in java?

1049


What are the new features in java 8? Explain

1002


Define jre i.e. Java runtime environment?

1082


What is the difference between throw and throws in java?

1166