So I got this task to complete a method called "remove5List". This method has to remove every object with mod5==0 of a given LinkedList of type String.
My approach was that I use the mod operator, but it only works with Integer I guess. Now I got to a point where I don't know how to continue.
This is my first post here and I'm a total beginner, so correct me if I did something wrong.
//edit: The list is filled with numbers
static void remove5List(List<String> list)
{
ListIterator<String> iter = list.listIterator();
while(iter.hasNext()) {
//here I would like to check if I can divide the obj by 5
}
}