Difference between Arraylist and Vector in abstractTableModel ?
I know there is a difference between Arraylist and Vector by theory. But I dont know if there will be any difference if I use either Arraylist or Vector in AbstactTableModel.
For ex:
--> Use of Array:
public class TabSeachModel extends AbstactTableModel
{
private String[][] rowData = {
{"001", "hello"}
};
public int getRowCount()
{
return rowData.length;
}
}
--> use of Vector
public class TabSeachModel extends AbstactTableModel
{
Vector rowData = new Vector(11);
public int getRowCount()
{
return rowData.size();// dont know size or length...
}
}
--> use of arraylist
public class TabSeachModel extends AbstactTableModel
{
ArrayList<type> rowData = new ArrayList<type>(11);
public int getRowCount()
{
return rowData.size();// dont know size or length...
}
}
What will be the difference between all three with the reference to AbstractTableModel only.
I mean will it happen at any time like if the number of rows increase by too many, and if I use vector then it will sometimes show me memory error as vector increase double each time...
Thanks.