+ 1

Java int[] array type of question

Is there any way to put array inside of other array? Like: int[] test={"1","2","3"}; And now i'd like to insert array inside of test[2]. Any suggestions?

12th Jan 2017, 7:33 PM
Piskorskee skee
10 Antworten
+ 7
like this? int test[] = {1, [2,3], 3}; I think that's only doable in python
12th Jan 2017, 8:05 PM
Filip
Filip - avatar
+ 7
Why would you want to use array in an array for that?
12th Jan 2017, 8:15 PM
Filip
Filip - avatar
+ 7
Use switch with for
12th Jan 2017, 8:30 PM
Filip
Filip - avatar
+ 5
my pleasure what compiler are you using? cause android Callender app is perfect
12th Jan 2017, 9:19 PM
Faramarz Monazami
Faramarz Monazami - avatar
+ 4
there are day and month and year in default read a code about a Callender app it'll help a lot
12th Jan 2017, 9:09 PM
Faramarz Monazami
Faramarz Monazami - avatar
+ 2
Best way to do it is using arraylist. You can create arraylist of the arrays and append those arraylist to the main arraylist. Alternatively you can do something like this int[][]= new int[][] { array1, array2, array3}; but you may run into issues.
12th Jan 2017, 8:38 PM
wmwm
+ 1
Thanks :)
12th Jan 2017, 9:11 PM
Piskorskee skee
0
I want to make 12 months and each one has to have 31 or 30 days and also each month should be possible to count from one to thirty - one
12th Jan 2017, 8:14 PM
Piskorskee skee
0
Is there other way to do it then? Like Best one
12th Jan 2017, 8:22 PM
Piskorskee skee
0
Days inside of this month
12th Jan 2017, 8:25 PM
Piskorskee skee