Skip to content

Instantly share code, notes, and snippets.

@booo
Created November 5, 2013 10:13
Show Gist options
  • Save booo/7316803 to your computer and use it in GitHub Desktop.
Save booo/7316803 to your computer and use it in GitHub Desktop.
import java.util.ArrayList;
import java.util.List;
import java.lang.StringBuffer;
public class Foo {
public static void main(String[] args) {
List<StringBuffer> list = new ArrayList<StringBuffer>();
list.add(new StringBuffer("foo"));
System.out.println(list.get(0));
list.get(0).append("bar");
System.out.println(list.get(0));
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment