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

string is immutable? right every one knows that, my
question is it advantage or disadvantage making string
immutable?

Answer Posted / ashish balhara

The performance for String is poor as compared to String
Buffer, as internally (for eg. a simple operation like + on
String), it generates String Buffer, calls append operation
(eqvt. of + in String) & converts result back to String.
Hence extra bytecode is generated which could be done away
with.

Is This Answer Correct ?    0 Yes 5 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is advantage of java?

1025


List down the methods and interfaces of collection class in java.

984


What is an infinite loop?

1255


Why arraylist is not synchronized in java example?

1060


Write a program to print all permutations of string?

1115


Explain what access modifiers can be used for variables?

1059


How do you generate random numbers in java?

1006


What is set string?

1183


How does a for loop work java?

1035


What are void pointers?

1305


What is the purpose of garbage collection in java? When is it used?

1048


What is lambda programming?

1006


Write a program to solve producer consumer problem in java?

1011


Does substring create a new object?

996


What is the format specifier?

937