Question: please write this in java language! thank you! Suppose we are to write a method, duplicateCheck, that receives an array of int as a parameter

please write this in java language! thank you!
Suppose we are to write a method, duplicateCheck, that receives an array of int as a parameter and returns a boolean indicating whether or not any value appears in the array more than once. There are two solutions to the problem (there can be more). One solution is to copy the array to another array, sort the elements of the array, and then test if another of the neighboring pair in the sorted array has two identical values. The other solution to try all possible pairs of distinct indexes over the array and see if any of the pair points to two identical values. Write the method in these two different ways
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
