Skip to Main Content

New to Java

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Delete elements from ArrayList

807598Dec 16 2005 — edited Dec 16 2005
Hello,

I wrote a method that was supposed to delete elements from an array list. The method is supposed to search for a given element and delete. I did not know how to implement the search, I tried this code. But it does not do any thing.

public void deleteMembers(Club c){
if(c instanceof Club){
super.members.remove(c);
}
}

Could you possibly help please?

thanks

R
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jan 13 2006
Added on Dec 16 2005
1 comment
99 views