![Trending Articles on Technical and Non Technical topics](/images/trending_categories.jpeg)
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
Physics
Chemistry
Biology
Mathematics
English
Economics
Psychology
Social Studies
Fashion Studies
Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
How to use remove(obj), remove(index), and removeAll() methods in Java list collections?
remove(int index) − Removes the element at position index from the invoking list and returns the deleted element. The resulting list is compacted. That is, the indexes of subsequent elements are decremented by one.
removeRange(int fromIndex, int toIndex) − Removes all of the elements whose index is between fromIndex, inclusive and toIndex, exclusive.
removeAll(Collection<?> c) − Removes from this list all of its elements that are contained in the specified collection (optional operation).
Advertisements