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
What you have to do is , you have to check for each element in second array whether previous element is already present or not.
You can use better approach Use HashSet and return set.
public static Set removeDuplicates(int []s){
Set set = new HashSet();
for(int i=0;i
If you need int Array than take a look of this java-hashsetinteger-to-int-array link.