Question: part a Write a method called hasDuplicate0 that takes as input an array of numbers and returns true if there is a duplicate number in
part a Write a method called hasDuplicate0 that takes as input an array of numbers and returns true if there is a duplicate number in the array, and returns false if array consists of unique numbers. For example, given100. 4, 2, 2] your method should return true(since 2 is repeated), but given [, 5, 2]. your method should return false (since no element is repeated). publie boolean hasDuplicate int numbersArray write your code here
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
