java - User defined Array dimensional and size -


i have unsolvable task, have task, have insert random number array. user can choose if array 1d, 2d, 3d,size of array optional . tried withot success. can not use arraylist. thank help.

double[] array= new double[size]; ( int i;i<dimensional;i++) {  double[] array= new double[size]; } 

edit: mind if effective way create array 1d , add array 1 or more dimension.

multi-dimensional arrays in java arrays of arrays. user provides number of dimensions , sizes @ runtime need dynamically build array @ point. it's strange problem, , not 1 try solve arrays in production code, nevertheless should possible. try accepted answer this question, seems pretty attempt.


Comments

Popular posts from this blog

ruby - Trying to change last to "x"s to 23 -

jquery - Clone last and append item to closest class -

css - Can I use the :after pseudo-element on an input field? -