Java: Remove the third element from a array list
6. Remove Third Element
Write a Java program to remove the third element from an array list.
Pictorial Presentation:

Sample Solution:-
Java Code:
Sample Output:
[Red, Green, Orange, White, Black] After removing third element from the list: [Red, Green, White, Black]
Flowchart:

For more Practice: Solve these Related Problems:
- Write a Java program to remove the third element from an ArrayList and then print the list without that element.
- Write a Java program to remove the third element and handle cases where the list has fewer than three elements using exception handling.
- Write a Java program to remove every third element from an ArrayList using a loop and then display the final list.
- Write a Java program to use Java streams to filter out the element at index two and collect the remaining elements into a new list.
Go to:
PREV : Update ArrayList Element.
NEXT : Search Element in ArrayList.
Java Code Editor:
Contribute your code and comments through Disqus.
What is the difficulty level of this exercise?
Test your Programming skills with w3resource's quiz.