编辑器
import java.util.LinkedList; public class Main { public static void main(String[] args) { LinkedList
cars = new LinkedList
(); cars.add("Volvo"); cars.add("BMW"); cars.add("Ford"); cars.add("Mazda"); // Use getFirst() to get the first item in the list System.out.println(cars.getFirst()); } }
Volvo