when I try to access the method of another class, it gives me an error that non-static method can't be accessed from static method but none of my methods are static.
import java.util.ArrayList;
public class creatureClassDriverRathtarsGame
{
public static void main(String[] args)
{
creatureClass player = new creatureClass("name", 14,new locationClass(0, 0, 0));
ArrayList <locationClass> locationRathTars = new <locationClass> ArrayList(5);
for(locationClass r: locationRathTars)
{
int randomRow = (Math.random() * ((locationClass.getMaxRow()) + 1));
int randomCol = (Math.random() * ((locationClass.getMaxCol()) + 1));
creatureClass rathtars = new creatureClass("rathtars",0, new locationClass(randomRow, randomCol, 0));
}
and the acessor method that is being called is
public int getMaxRow()
{
return maxrow;
}
public int getMaxCol()
{
return maxcol;
}