VOOZH about

URL: https://www.geeksforgeeks.org/java/abstractlist-remove-method-in-java-with-examples/

⇱ AbstractList remove() Method in Java with Examples - GeeksforGeeks


  • Courses
  • Tutorials
  • Interview Prep

AbstractList remove() Method in Java with Examples

Last Updated : 11 Jul, 2025
The remove(int index) method of java.util.AbstractList class is used to remove an element from an abstract list from a specific position or index. Syntax:
AbstractList.remove(int index)
Parameters: The parameter index is of integer data type and specifies the position of the element to be removed from the AbstractList. Return Value: This method returns the element that has just been removed from the list. Below programs illustrate the AbstractList.remove(int index) method: Program 1:
Output:
AbstractList: [Geeks, for, Geeks, 10, 20]
Final AbstractList: [Geeks, for, Geeks, 20]
Program 2:
Output:
AbstractList:[Geeks, for, Geeks, 10, 20]
Final AbstractList:[for, Geeks, 10, 20]
Comment