Simple java arrays question

Soldato
Joined
1 Mar 2003
Posts
5,508
Location
Cotham, Bristol
Why is it that you can do this

Code:
int [] myArray1 = {0,1,2,3,4,5};

But you can't do this

Code:
int [] myArray1;
myArray1 = {0,1,2,3,4,5};

Cheers,
Paul
 
Back
Top Bottom