0
Help plz đ I need java code "remove the duplicate elements in array" using only for /if/while đ«
x=[1,2,2,2,3,5,3] ==== x=[1,2,3,5]
2 Answers
+ 3
Just use a set and it will automatically remove duplicates.
example:
Set<T> mySet = new HashSet<T>(Arrays.asList(someArray));
0
with out set đđ only for loop and if statement