Skip to content
Advertisement

Im trying to delete elements of an arraylist via inputs but the program stops at the third input, I would like to know why it does that

Im trying to delete elements of an arraylist via inputs but the program stops at the third input, I would like to know why it does that.

Scanner scan = new Scanner(System.in);

JavaScript

}

Advertisement

Answer

There are a couple of problems with your program.
The condition of for loop was not correct and some other minor issues.

Here, is a better version of your program:

JavaScript
User contributions licensed under: CC BY-SA
6 People found this is helpful
Advertisement