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