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

what is mutability?which one is mutable String or StringBuffer?and why?give
examples of each which shows the mutability of each String or StringBuffer

Answer Posted / surya simhadri

Mutability means which can be changed. StringBuffer is a
mutable bcoz the contents of the SB object we can change,
it can't create new reference location even though we
change the value it already referenced. But in case of
String it reference location is changed every time if u
change the content.

Is This Answer Correct ?    58 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the Scope of Static Variable?

1236


What is an array length?

908


How do you check if two strings are equal in java?

1011


What is the size of an array?

1038


Can an interface extend a class?

995


What is super keyword explain with example?

1287


Explain access specifiers?

1178


Explain importance of throws keyword in java?

982


What is a line break example?

1002


Is it possible to define a method in java class but provide it’s implementation in the code of another language like c?

1032


How do you represent a space in regex java?

1013


What do you mean by stack?

1159


What is package protected in java?

992


What does a method signature consist of?

984


Can we use string in switch case in java?

1059