import java.util.LinkedList; public class Example { public static void main(String[] args) { LinkedListDescription: In this example, we create a LinkedList named "fruits" and add some elements to it using the add(), addLast(), and offer() methods. We also use the push() method to add an element to the beginning of the list. Finally, we print the contents of the list using the toString() method. Package library: java.utilfruits = new LinkedList<>(); // add elements to the end of the list fruits.add("apple"); fruits.add("banana"); fruits.addLast("orange"); fruits.offer("pear"); // add element to the beginning of the list fruits.push("guava"); System.out.println("Fruits: " + fruits); } }