Write a Java method that takes an int[] array and prints the…
Write a Java method that takes an int[] array and prints the following: How many even numbers the array contains. How many odd numbers the array contains. The largest even number (or -1 if none exist). The smallest odd number (or -1 if none exist). The sum of all even numbers. The sum of all odd numbers. Important:You must not modify the original array.