The simplest removal method, clear(), is the one that clears all of the elements from the list.
You will get an UnsupportedOperationException if the list is read-only.
import java.util.ArrayList; import java.util.List; public class MainClass { public static void main(String args[]) throws Exception { List list = new ArrayList(); list.add("A"); list.add("B"); list.add("C"); list.clear(); System.out.println(list); } }