computer science

profiley654293137

Write a method called allUnique that takes an array of integers as a parameter and returns a boolean that is false if the array has any duplicate values and is true if all elements in the array are unique. For example, if the array contains the int values 2, 3, 5, 2, 8 then the method should return false, but if the array contains the int values 5, 4, 2, 3, 1 then the method should return true.

Just submit the definition of the method itself, not the main program that tests it. But you are strongly recommended to test the code using either Eclipse or Processing.

and want it with in 30 minutes

    • 8 years ago
    • 5
    Answer(2)

    Purchase the answer to view it

    blurred-text
    NOT RATED
    • attachment
      cprogram.txt

    Purchase the answer to view it

    blurred-text
    NOT RATED
    • attachment
      java-is-array-unique.zip