This question already has an answer here:
(这个问题已经在这里有了答案:)
(如何从Java中的数组中删除对象?)
(21个答案)
Is there any fast (and nice looking) way to remove an element from an array in Java?
(有什么快速(好看的)方法可以从Java中的数组中删除元素?)
You could use commons lang's ArrayUtils.
(您可以使用common lang的ArrayUtils。)
array = ArrayUtils.removeElement(array, element)
commons.apache.org library:Javadocs
(commons.apache.org库:Javadocs)
2.1m questions
2.1m answers
60 comments
57.0k users