Question: Write a method that returns a new array by eliminating the duplicate valuesin the array using the following method header:public static int[] eliminateDuplicates(int[] list)Write a test program that reads in 10 integers, invokes the method, and displaysthe distinct numbers separated by exactly one space.

Read more of this post