Write a program DuplicateTester.java that prompts user for a posi- tive integer x and creates an array with x randomly generted integer ele-
ments in range 0 to 9. Use a method with signature public static int[] removeDuplicates(int[] array); to remove all duplicate elements in the
array. Your program is expected to terminate by displaying the new array. Following is a sample expected run of the program.
javac DuplicateTester.java
$ java DuplicateTester
Size of Array: 10
Generated Array:
3 4 2 8 2 4 3 1 6 7
Filtered Array:
3 4 2 8 1 6 7