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 -

Socket.connect doesn't throw exception in Android -

iphone - How do I keep MDScrollView from truncating my row headers and making my cells look bad? -