0
How to save array
I need to create a dynamic class. I have an array of string type and I have a class that takes one number from the user and produces new arrays from the first array as much as that number. I need to save new arrays stored in memory to use them later. https://code.sololearn.com/cJPhkhqUA5q2/?ref=app
4 odpowiedzi
+ 1
https://www.sololearn.com/learn/Java/2149/
+ 1
There exists no type array. You can say array of type int or of type String ...
But you can do it like this:
String [][] = new String [][]
For example:
String arrays =
{ {"a","b","c"} , {"d","e"} }
So you have two String arrays inside an array.
String [index of array][index of value]
String [0][1] --> b
0
I would try an ArrayList.
https://www.sololearn.com/learn/Java/2179/
0
this is not my mean
I need an array of array type