aspose file tools*
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes StringBuffer & StringBuilder Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "StringBuffer & StringBuilder" Watch "StringBuffer & StringBuilder" New topic
Author

StringBuffer & StringBuilder

Sanjay Izardar
Greenhorn

Joined: Apr 18, 2011
Posts: 19
are there some methods which are defined in StringBuffer but not in StringBuilder class?
Darryl Burke
Bartender

Joined: May 03, 2008
Posts: 4523
    
    5

What does the API say?


luck, db
There are no new questions, but there may be new answers.
Ikpefua Jacob-Obinyan
Ranch Hand

Joined: Aug 31, 2010
Posts: 394

Sanjay Izardar wrote:

are there some methods which are defined in StringBuffer but not in StringBuilder class?

Ikpefua wrote:

Hello Sanjay, the API says both classes are virtually the same, the ONLY difference is that
StringBuffer has sychronized methods to make it threads safe.

For the exams you need to know the differences between the StringBuffer/StringBuilder compared to the String class.

I hope this helps.


OCPJP 6.
In Your Pursuit Towards Certification, NEVER Give Up.
Mala Gupta
Author
Ranch Hand

Joined: Sep 27, 2002
Posts: 245
    
    9
Apart from referring to the Java API, you can also refer to the source code of these classes - if you are keen on witnessing the differences yourself.

cheers
Mala


Author of Manning's OCA Java SE 7 Programmer I Certification Guide and OCP Java SE 7 Programmer II Certification Guide
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: StringBuffer & StringBuilder
 
Similar Threads
Ya got String, got StringBuffer - and now ya got StringBuilder!
Printing Int Array to File using PrintWriter
String and StringBuffer
Problem in String Buffer - incrementing char in string
how to make this code perform better