java - How to remove new ArrayList<>? -


i have try methods remove, removeall, delete. of these words not available in android studio. word should used instead?

public list<contactobject> receipt = new arraylist<>(); receipt.add(new contactobject(object.product_title, object.product_price,     object.img1, object.quantity)); 

i know how add list receipt, how remove data added?

the remove() of arraylist depends on implementation of equals() method, in case in contactobject.

invoking remove() solve issue.

receipts.remove(contactobject); 

Comments

Popular posts from this blog

c++ - list<myClass<int> * > sort -

c - Defining floating point constants, how many digits are useful? -

C# Apple Bonjour - how to monitor service records within Windows -