Nguyễn Thị Thuý
New member
What is remove method in Java?
Answer
Method remove(int index) is
used for removing an element of the specified index from a list
. It removes an element and returns the same. It throws IndexOutOfBoundsException if the specified index is less than zero or greater than the size of the list (index size of ArrayList).
Answer
Method remove(int index) is
used for removing an element of the specified index from a list
. It removes an element and returns the same. It throws IndexOutOfBoundsException if the specified index is less than zero or greater than the size of the list (index size of ArrayList).