collections - Java/ Remove a Integer value from a list -


this question has answer here:

i have following lists of integer

whattoremove = {2, 3, 8}; 

and list

lst = {4, 6, 8} 

i want remove whattoremove elements lst.

i trying use lst.remove(whattoremove.get(i)), trying remove index, , not value.

how can that?

    list<integer> whattoremove = arrays.aslist(2, 3, 8);     list<integer> lst = new arraylist<integer>(arrays.aslist(4, 6, 8));     lst.removeall(whattoremove); 

Comments

Popular posts from this blog

SPSS keyboard combination alters encoding -

Add new record to the table by click on the button in Microsoft Access -

CSS3 Transition to highlight new elements created in JQuery -