Even if it is synchronized with the object of sb1, stringbuilder methods are not synchronized, so the main thread can access the non synchronized append method of sb1. This does not hold true for stringbuffer sbf as the methods of stringbuffer are synchronized.
[ SCJP 6.0 - 90% ] , JSP, Servlets and Learning EJB.
Try out the programs using a TextEditor. Textpad - Java 6 api