Created
April 28, 2013 12:39
-
-
Save idefixcert/5476772 to your computer and use it in GitHub Desktop.
Fast ArrayList Initialization
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private static String[] array = new String[]{"Test", "Test"}; | |
private static List<String> arraylist = new ArrayList<String>() { | |
{ | |
add("Test"); | |
add("Test"); | |
} | |
}; | |
private static Map<String,String> map = new HashMap<String,String>() { | |
{ | |
put("one","Test"); | |
put("two","Test"); | |
} | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment