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

How many decimal digits is 64 bit?

982


What is default exception handling in java?

1064


When will you define a method as static in Java?

1099


What is an interface in java?

1086


What is the difference between math floor and math round?

1107


What is class array in java?

1117


What is a parameter in matrices?

1104


Why does the integer quotient -0/3 yield 0, but the double quotient -0.0/3.0 yields – 0.0?

1106


What are default methods ?

1103


Why is java not 100% pure oops?

1231


What is the implementation of destroy method in java. Is it native or java code?

1019


Can static method access instance variables ?

1182


What is hashmap in java?

1104


How do you reverse a string in java without using string buffer?

1145


What are byte codes?

1293