0
Arrays inside an array with generic class?
Say I have a class called StoreArray which has a generic parameter. When a object of it is created, it initializes an array called storage with parameter int length. So if I made: StoreArray<String> s = new StoreArray<String>(5) It would create the storage array 5 spaces. But If I want to create a object that stores arrays , how do I go about doing that. I thought: StoreArray<String[]> s = new StoreArray<String[]>(5) That would make 5 arrays Inside storage I think. But how do I set the Length of each array?
1 Resposta
0
If i wanted to set the length to 4 of each array, could i put <String[4]> instead?