Skip to content

Instantly share code, notes, and snippets.

Created October 3, 2012 18:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anonymous/3828895 to your computer and use it in GitHub Desktop.
Save anonymous/3828895 to your computer and use it in GitHub Desktop.
class Lock {
public static void main( String ... args ) {
StringBuffer buffer = new StringBuffer();
//synchronized(buffer) {
for ( int i = 0 ; i < Integer.MAX_VALUE / 16 ; i++ ) {
buffer.append( i );
buffer.delete(0, buffer.length() -1 );
}
//}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment