public class Test{ public static void main(String[] args){ LinkedList<Integer> list = new LinkedList<Integer>(); list.add(3); list.add(1); list.add(2); System.out.println(list.getFirst()); } } }back top next
public class Test{ LinkedList<Integer> list = new LinkedList<Integer>(); list.add(1); Integer x = list.get(1); }back top next
public class Test{ LinkedList<String> list = new LinkedList<String>(); list.add("a"); list.add("b"); list.add("c"); String x = list.get(1); }back top next