For example, one might initialize a character array as:
char[] myArray = new char[3];
myArray = {'a', 'b', 'c'};
Or one might initialize the character array as:
char[] myArray = {'a','b', 'c'};
What is the benefit of using the “new” methodology ?
Incidentally, in the first example, why am I also allowed to assign the { … } set without passing it to a constructor method (in parenthesis)?
char[] myArray = new char[] {'a', 'b', 'c'};
{and}is a Short cut syntax and here the length of the array is determined by the number of values provided between{ and }.From Arrays Oracle docs