This is not the actual answer, but since I cannot show you the formatted code in the comment, I use this.
Unformatted code:
new ArrayList<String>() { { add("RJ"); add("MJ");}};
Formatted Code [ECLIPSE Formatting]
new ArrayList<String>() { { add("RJ"); add("MJ"); } };
I somehow feel that it is Beautifully formatted. Are you asking for something else?
source share