Write a generic method named findMaxElement that takes an array of comparable elements and returns the maximum element in the array. If the array is empty, the method should throw an EmptyArrayException.Create a test program that demonstrates the usage of the findMaxElement method with different types of arrays (integer, string, and double). The test program should: L Create three arrays of different types (integer, string, and double).
ii. Call the find MaxElement method on each array.
Catch the Empty ArrayException and print an error message if an exception is thrown
iv. Print the maxinnum element found in each array
Write the code using java