I'm trying to remove duplicate numbers from an array using a method but, unfortunately I can not solve it. This what I have done so far:
//method code
public static int[] removeDuplicates(int[] input){
    int []r=new int[input.length];
    for (int i = 0; i < input.length; i++) {
        for (int j = 0; j < input.length; j++) {
            if ((input[i]==input[j]) && (i != j)) {
                return r;
            }
        }
    }
    return r;
}
 
     
     
     
     
    