So I'm having some issues with adding ArrayLists to my ArrayList. Think of this as a table.Here's some example code:\[code\] ArrayList<String> currentRow = new ArrayList<String>(); while ((myLine = myBuffered.readLine()) != null) { if(rowCount == 0) {// get Column names since it's the first row String[] mySplits; mySplits = myLine.split(","); //split the first row for(int i = 0;i<mySplits.length;++i){ //add each element of the splits array to the myColumns ArrayList myTable.myColumns.add(mySplits); myTable.numColumns++; } } else{ //rowCount is not zero, so this is data, not column names. String[] mySplits = myLine.split(","); //split the line for(int i = 0; i<mySplits.length;++i){ currentRow.add(mySplits); //add each element to the row Arraylist } myTable.myRows.add(currentRow);//add the row arrayList to the myRows ArrayList currentRow.clear(); //clear the row since it's already added //the problem lies here ***************** } rowCount++;//increment rowCount } }\[/code\]The problem is when I don't call \[code\]currentRow.clear()\[/code\] to clear the contents of the ArrayList that I'm using in each iteration (to put into my ArrayList of ArrayList), with each iteration, I get that row PLUS every other row.But when I do call \[code\]currentRow.clear()\[/code\] after I add \[code\]currentRow\[/code\] to my \[code\]arrayList<ArrayList<String>\[/code\], it actually clears the data that I added to the master arrayList as well as the currentRow object.... and I just want the currentRow ArrayList empty but not the ArrayList that I just added to my ArrayList (Mytable.MyRows[currentRow]).Can anyone explain what's going on here?