zeroliken
Nearly a Posting Virtuoso
1,346 posts since Nov 2011
Reputation Points: 214
Solved Threads: 205
Skill Endorsements: 14
you can initialize it as null, and then when you know how long will it be, you can assign a new array.
int[] myArray = null;
//somwhere else at your code
myArray = new int[10]; //or whatever your lenght will be
just be shure to access it after it is initialized, otherwise you will get NullPointerException.
--------------
P.S: Maybe you want to sign in, I'm designing a java online course :D
<URL SNIPPED>
RicardoE
Junior Poster in Training
73 posts since Jan 2010
Reputation Points: 21
Solved Threads: 7
Skill Endorsements: 0
Question Answered as of 1 Year Ago by
RicardoE
and
zeroliken