you're trying to print out information before it's initialized. Move the print statement outside the for loop
for(int i = 1; i <= my2dArray.length; i++)
{
my2dArray[i-1] = new int[i];
}...
Type: Posts; User: helloworld922
you're trying to print out information before it's initialized. Move the print statement outside the for loop
for(int i = 1; i <= my2dArray.length; i++)
{
my2dArray[i-1] = new int[i];
}...
If you want a multi-dimensional arraylist, see the tips and tricks section (you might have to do a search for it). The basic premise is this, though: A multi-dimensional array is just an array of...