I need to add dynamically a cell to a matrix or an Object[][] to be more precise, the size of the Object's columns is 2 and the rows need to grow every time i need to add an entry.
I found this answer but the problem is that it handles a one dimensional arraylist, and i don't how to handle a two dimensional arraylist.
So the question exactly is: How can i add dynamicaly and in ascending order a row to an matrix of Objects or to an arraylist?
Any help would be appreciated and thank you in advance.