what is stringBuffer and StringBuilder?

Answer Posted / srinu

StringBuffer:-
1)All methods in String Buffer class are Synchronized.
2)Performance is slow because these are synchronized.

StringBuilder:-
1)StringBuilder class methods are not synchronized.
2)performance is faster.

Is This Answer Correct ?    2 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Do I have to use jsps with my application?

744


how to make a index.jsp for running the site in internet and find an error for connection with weblogic server and java that give an error invalid object name.and how to maintain session.

1951


Can constructors be synchronized in java?

801


What are the different types of exception?

770


hi friends, i have done my BE(CSE)at 2011 then i have joined one company before they asked me 50k so i paid but now they telling no project here so we r going to close like that so now i need any job i have good knowledge in core java and j2ee(jsp,servlet,jdbc) so if u know any job pl help me

1984






How would you create a button with rounded edges?

740


What do you need to set-up a cluster with jboss?

791


Which textcomponent method is used to set a textcomponent to the read-only state?

854


What are the call back methods in entity bean?

764


What’s jboss cache in short?

811


what is handle?

2070


Why is actionform a base class rather than an interface?

759


If your ui seems to freeze periodically, what might be a likely reason?

757


What are the different class loaders used by jvm?

799


When a thread blocks on i/o, what state does it enter?

781