import java.util.LinkedList;
public class LinkedListClearAllElement {
public static void main(String[] args) {
LinkedList<String> ll = new LinkedList<>();
LinkedList<String> ll1 = new LinkedList<>();
//addding element to linkedlist ll
ll.add("Ishu");
ll.add("Nishu");
ll.add("Naina");
ll.add("Nishu");
ll.add("Shiksha");
System.out.println("Before removing element, the LinkedList is :");
System.out.println(ll);
//adding elements to linkedlist ll1
ll1.add("Suhani");
ll1.add("Neha");
ll1.add("Kayna");
ll.clear();
ll1.clear();
System.out.println("LinkedList ll:");
System.out.println(ll);
System.out.println("LinkedList ll1:");
System.out.println(ll1);
}
}