Consider the following class: public class Player implements…

Consider the following class: public class Player implements Comparable { private String name; private int goalsScored; // other methods go here public int compareTo(Object otherObject) { __________________________________ return (goalsScored – otherPlayer.goalsScored); } } What statement can be used to complete the compareTo() method?

Consider the following class: public class Player implements…

Consider the following class: public class Player implements Comparable { private String name; private int goalsScored; // other methods go here public int compareTo(Object otherObject) { __________________________________ return (goalsScored – otherPlayer.goalsScored); } } What statement can be used to complete the compareTo() method?

Complete the following code snippet with the correct enhance…

Complete the following code snippet with the correct enhanced for loop so it iterates over the array without using an index variable.       String[] arr = { “abc”, “def”, “ghi”, “jkl” };   ___________________   {      System.out.print(str);     }