I've seen that arrays work when you declare them like this:
int[] myarray = {2,4,6,8,10}; //Notice the brackets are with the type
And when you declare them like this:
int myarray[] = {2,4,6,8,10}; //Here the brackets are with the array name
So which one is the correct way of declaring an array and what are the differences (if any) between the 1st and the 2nd.
Thanks.