String is Immutable - String Vs String builder
String is immutable
- String a=”a”; address is 12345
- a=”b”; address will be 3456
- String a=new String(“a”);
- Will create one object in String pool and create one more object for new operator will get created and that will point to it.
- String a=”a”; will create object in string pool and object a will point to it.
StringBuffer is mutable
- StringBuffer b=”a”; address is 12345
- b=”b”; address is 12345
- This is synchronized
StringBuilder : This is similar to StringBuffer but this is not synchronized
0 comments to "String is Immutable - String Vs String builder"
Powered by WidgetsForFree
- ▼ December (6)
- ► 2011 (18)
- ► 2010 (35)
- ► 2009 (73)
My Blog List
- Airtel and vodafone GPRS settings for pocket PC phones
- Andhra 2 America
- Ayyappa Deeksha required things
- Blogs I watch !
- Captions for your bike
- DB2 FAQs
- Deepavali Vs The Goddes of sleep
- ETV - Dhee D2 D3
- Evolution of smoking in India Women
- How to make credit card payments?
- Java-J2EE interview preparation
- My SQL FAQs
- My Travelogues
- Old is blod - New is italic
- Online pay methids for credit cards
- Oracle FAQs
- Smoking in Indian Women
- Technology Vs Humans
- Twitter feeds for all Telugu stars on single page.
- Unix FAQs
- Unix best practices
- init 0, init 1, init 2 ..
- mCheck Application jar or jad download