+ 1
Add to the ArrayList using conditional statement
I want to Add an element to an ArrayList using a interaction, while loop and if statement. I have a code below but it giving an error. Any modification I should do? https://code.sololearn.com/cIqMy7by8RHN/?ref=app
1 Answer
+ 6
Iterator was used to traverse the list and it's not a list itself.
However, you can add it into the ArrayList. đ