Hi so I'm still learning to use methods, but one of my assignments requires me to call a method from a method in a different .java file.
The problem is "Sets" is not recognized and it displays an error message stating that both "Sets" cannot be resolved to a variable. Am I calling the method incorrectly?
This is the method if it is relevant. It comes from a java file called Sets.
public static final int Initial_Pop = (int)(EARTH_AT * EARTH_BT * 0.4); This is the method I'm trying to call the above method..
public static void plusPeople (int[][] earth, int newPerson) { int [][] earthpopulation = new int [Sets.EARTH_AT][Sets.EARTH_BT]; } I apologize if I'm unclear or did not provide enough information. If so please tell me!
.javafile should have apackagedeclaration at the very top. Are your two classes in the same package?