public void fixEmptyRows() { Boolean isEmpty = true; for(int i=0; i < rows.size();i++) { for(String col : rows.get(i)) { if(col.length() > 1) { isEmpty = false; } } if(isEmpty == true) { this.rows.remove(i); i--; } isEmpty = true; } }