TO delete from arraylist
Hi,I want to delete subarraylist.,how to do it.Ex: [[a,b,c],[d,e,f],[g,h,i]]i have three arrayList in one main arrayList.,as shown above in example i want to delete sub ArrayList.How to delete it..Plzzzzzzzz help me.
[265 byte] By [
Ap1_2a] at [2007-11-27 0:26:27]

By "delete" do you mean "remove"?If so, just use either of the remove() methods. One will remove a particularsublist that you specify, the other removes the sublist at a given index.
Hi,I want to remove 1 sublist.First i will check for the key,if that particular key is present in any of the sublistthat particular sublist should remove..How to do it ?
Ap1_2a at 2007-7-11 22:25:02 >

Hi, Delete means remove. Actually i am searching for the key in sublist,if that key is present in any of the sublist,that particulat sublist should remove.How todo it ?Plzzzz help.
Ap1_2a at 2007-7-11 22:25:02 >

> How to do it ?
Just the way you described: check the sublist at each index. If it contains the key,
remove it. You might find it easier to write your loop that goes through the list so that
it starts with the last element and works back to the first. (or use an iterator).