write a method called max that accepts an array of integers as a parameter and returns the maximum value in the array. for example, if the array passed stores {12, 7, -1, 25, 3, 9}, your method should return 25. you may assume that the array contains at least one element. your method should not modify the elements of the array.