How to fill a two Dimensional ArrayList in java with Integers?
- by eNetik
I have to create a 2d array with unknown size. So I have decided to go with a 2d ArrayList the problem is I'm not sure how to initialize such an array or store information.
Say I have the following data
0 connects 1
2 connects 3
4 connects 5
....etc up to a vast amount of random connections
and I want to insert
true(1) into [0][1],
true(1) into [2][3],
true(1) into [4][5].
Can the array automatically update the column/rows for me
Any help is appreciated thanks