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

What is the diffrence between a local-tx-datasource and a xa-datasource? Can you use transactions in both?

567


What are the different algorithms used for clustering?

546


we use MainFrame and using os390 for operating system with DB2 data base in IRAN and interest programing with java and use webspere for world wide,please help me where i should start?

1922


Can I map more than one table in a cmp?

590


how i secure my site with the https protocol.what are the steps?

1733






What is re-entrant. Is session beans reentrant. Is entity beans reentrant?

578


What is threadfactory?

613


Where we can write Rmi registry in the code, without having to write it at the command prompt?

2256


What is the relationship between the canvas class and the graphics class?

538


Explain about local interfaces.

582


How would you reatach detached objects to a session when the same object has already been loaded into the session?

677


Name three component subclasses that support painting?

612


What are the types of scaling?

552


How messaging services are done, before release of JMS?

1585


Which class is the immediate superclass of the menucomponent class?

626