In this gist I quickly showcase the differences between the following three code snippets:
int[] array = new int[] {10, 20, 30};
int[] array = {10, 20, 30};
int[] array = new int[3]; array[0] = 10; array[1] = 20; array[3] = 30;
I do this by disassembling the class files for those code snippets (which i obtain after compiling them). This arose due to a question that was asked on stackoverflow about their difference: http://stackoverflow.com/questions/17245450/how-are-array-object-created-when-using-a-bracketed-list
I also do this for:
String str = new String("Hello");```