keywords: arraylist java initializers initialization static
text: Hidden Java Features \\Really cool blog post about hidden Java features.  These are little tricks that\you forget about from time to time but that make life more pleasant.\\This is a good one:\\"Instance initializers -- I've been exploiting these lately to abbreviate list\initialization (in unit tests only):\&gt;\List triple = new ArrayList(3) \&gt;\   add("a"); add("b"); add("c"); \&gt;\;"\\I've been using static code blocks but this looks like it might be a better\trick.\\Example:\\"public static List = new ArrayList();\&gt;\static \    list.add( "foo" );\"\\Also this final Closure  hack seems pretty cool:\\