Remove duplicates from integer array

前端 未结 23 2369
执念已碎
执念已碎 2020-12-01 18:52

I having a problem with coding this:

Write a static method named removeDuplicates that takes as input an array of integers and returns as a result a new

23条回答
  •  野趣味
    野趣味 (楼主)
    2020-12-01 19:35

    You can also use Google's Guava library and use ImmutableSet do

    ImmutableSet.copyOf(myArray).asList();
    

提交回复
热议问题