Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
411 views
in Technique[技术] by (71.8m points)

java - 从数组中删除元素(Java)[重复](Removing an element from an Array (Java) [duplicate])

This question already has an answer here:

(这个问题已经在这里有了答案:)

Is there any fast (and nice looking) way to remove an element from an array in Java?

(有什么快速(好看的)方法可以从Java中的数组中删除元素?)

  ask by Tobias translate from so

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

You could use commons lang's ArrayUtils.

(您可以使用common lang的ArrayUtils。)

array = ArrayUtils.removeElement(array, element)

commons.apache.org library:Javadocs

(commons.apache.org库:Javadocs)


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...