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
Post a Comment