alright thank guys your reply is really appreciated
line 18 and line 19 gets myself tricked, if line 2 change to static and ofcourse synchronized(StringBuilder.class) as well, some threads might blocked and the output prints into consistent manner am i right?