LinkedListlist = new LinkedList<>(); list.add("apple"); list.add("banana"); list.add("cherry");
list.add(1, "pear");
list.remove("banana");
String first = list.get(0);
boolean contains = list.contains("cherry");
String[] arr = list.toArray(new String[list.size()]);The java.util.LinkedList class belongs to the java.util package library.