After reading, I came to know that, arrays in Java are objects. The name of the array is not the actual array, but just a reference. The new operator creates th
Please follow comments
int[] myArray = new int[5]; //memory allocated for 5 integers with nulls as values
int[] myArray= new int[]{5,7,3}; //memory allocated for 3 integers with values
int[] myArray= {5,7,3}; // same as above with different syntax memory allocated for 3integers with values.
Diffrerence between second and third style.
someX(new int[] {1,2,3}); // inline creation array style
someX(declaredArray); // using some declared array
someX({1,2,3}); //Error. Sorry boss, I don't know the type of array
private void someX(int[] param){
// do something
}