Question: Java Write a generic method that takes a square 2-dimentional array (size nxn) of objects (valid concrete object type) and prints out the elements located
Java
Write a generic method that takes a square 2-dimentional array (size nxn) of objects (valid concrete object type) and prints out the elements located on the diagonal of the array. The method signature is as follows: public static void PrintDiagonal(E[][] list) Test the method with at least 2 arrays of different concrete object types. Label your outputs properly and show the array lists content before and after calling this method PrintDiagonal.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
