Arrays Class Constructor:-
private Arrays() {}
My question is that if Array's class constructor is private then how exactly we are creating an object of Arrays.
Then what is the meaning of the below statement:-
int[] anArray = new int[10];
What is the relationship between the above statement and Array's class.
Any help for the question will be really appriciated.
解决方案
Arrays is simply a utility class for working with arrays, Just like Collections is a utility class for working with, you guessed it, collections. The statement new int[10] is a language construct and has nothing to do with the Arrays class.