📜  java 从列表中删除元素 - Java 代码示例

📅  最后修改于: 2022-03-11 14:52:09.542000             🧑  作者: Mango

代码示例1
List list = new ArrayList<>();
list.add("Hello World");

String removedStr = list.remove(0); // returns the removed element
boolean removeByElement = list.remove("Hello World"); // true if the element was deleted successfuly