JAVA QUESTION:
Please provide a demo program(s) that implement and used the methods: A generic method that returns the minimum element in an array. public static> E min(E[ ] list) A generic method that returns the maximum element in a two-dimensional array. public static > E max(E[ ][ ] list) A generic method that returns a new ArrayList. The new list contains the non-duplicate elements from the original list. public static ArrayList removeDuplicates(ArrayList list) Note: You can have a demo for each method Example: (Maximum element in an array) Implement a generic method that returns the maximum element in an array. public static > E max(E[ ] list) Implementation: /* Maximum element in an array. Implement the following method that returns the maximum element in an array. public static > E max(E[ ] list) */ public class Demo_max { public static void main(String[] args) { Integer[] numbers = { 1, 2, -3, 7, 5, 4 , 11,12, 87, 23, -1, 0, 3}; for (int i=0;i> E max(E[] list) { E max = list[0]; for (int i = 1; i Please provide a demo program(s) that implement and used the methods: A generic method that returns the minimum element in an array. public static> E min(E] List) A generic method that returns the maximum element in a two-dimensional array public static E max(E J] List) A generic method that returns a new ArrayList. The new list contains the non-duplicate elements from the original list. public static ArrayList removeDuplicates(ArrayList List) Note You can have a demo for each method Example (Maximum element in an array) Implement a generic method that returns the maximum element in an array public staticE extends ComparableE>> E max(E[ ] list) Implementation: Maximum element in an array. Implement the following method that returns the maximum element in an array public static >E max(E[] List) public class Demo_max public static void main(Stringl args) Integer ] numbers = { 1, 2,-3, 7, 5,4 , 11,12, 87, 23,-1, 0, 3); for (int i-0iKnumbers.length; ++) System.out.print numbers[i); System.out.println0 System.outprintln(Max +max(numbers)); public static max(ED list) E max- list[0] for (int i-1; i1.st.length; i++) { if (max.compareTo (list0) max- list[i] return max, Please provide a demo program(s) that implement and used the methods: A generic method that returns the minimum element in an array. public static> E min(E] List) A generic method that returns the maximum element in a two-dimensional array public static E max(E J] List) A generic method that returns a new ArrayList. The new list contains the non-duplicate elements from the original list. public static ArrayList removeDuplicates(ArrayList List) Note You can have a demo for each method Example (Maximum element in an array) Implement a generic method that returns the maximum element in an array public staticE extends ComparableE>> E max(E[ ] list) Implementation: Maximum element in an array. Implement the following method that returns the maximum element in an array public static >E max(E[] List) public class Demo_max public static void main(Stringl args) Integer ] numbers = { 1, 2,-3, 7, 5,4 , 11,12, 87, 23,-1, 0, 3); for (int i-0iKnumbers.length; ++) System.out.print numbers[i); System.out.println0 System.outprintln(Max +max(numbers)); public static max(ED list) E max- list[0] for (int i-1; i1.st.length; i++) { if (max.compareTo (list0) max- list[i] return max