Language/Type: Java inheritance polymorphism Assume that the following classes have been defined:Given the classes above, what output is produced by the following code? (Since the code loops over the elements of an array of objects, write the output produced as the loop passes over each element of the array separately.) Arya[] thrones ={ new Oberyn(), new Arya(), new Brienne(), new Tyrion() }; for (int i=0;i< thrones.length; i++){ thrones[i].a(): System, out.printin(); System. out.print ln( thrones [i]); thrones [i],b(); System, out.println(); System, out.println():element 0 element 1 element 2 element 3.