public class Demo02 {
public static void main(String[] args) {
LinkedList list =new LinkedList<>();//初始化容量
list.add("11");
list.add("22");
list.add("33");//增加
System.out.println(list);
list.remove(1); // 删除
list.remove("22");
System.out.println(list);
list.set(1,"333");//修改
System.out.println(list);
// 查询
for (String l : list){
System.out.println(l+"\t");
}
System.out.println(list);
for (int i =0; i < list.size();i++){
System.out.println(list.get(i)+"\t");
}
}
}