• + 1 comment

    I feel this is a bad practice of doing it. It should be solved using 2d array. That would be the right approach...Purpose of ArrayList is meant for growable array.