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

Ansible - ERROR! the field 'hosts' is required but was not set -

customize file_field button ruby on rails -

SoapUI on windows 10 - high DPI/4K scaling issue -