Issue
I would like to know how to remove duplicate values in Integer Array.
I think you may face This question in all languages.
But in android I don't know how to achieve this.Can anyone please help me to fix this issue.
Thanks in advance...
Solution
Be sure your array is Integer type not int
Integer[] array; // Your integer array...
Set<Integer> set = new HashSet<Integer>();
Collections.addAll(set, array);
Answered By - user370305
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.