Which of the following statements can be inserted to make Main compile?
package my.sports; public class Football { public static final int TEAM_SIZE = 11; } package my.apps; // INSERT CODE HERE public class Main { public int getTeamSize() { return TEAM_SIZE; } }
D.
Main is trying to refer to a static variable in another class.
It needs a static import to do so.
The correct syntax is import static and not static import.
B is incorrect because * does not import classes in a package.
C is incorrect because it does not refer to a static member.