当我尝试从我的主类中调用它时,我在访问单独类中的方法时遇到问题。这是方法
class RobotData
{
private int junctionRecorder(IRobot robot)
{
int[] juncX;
int[] juncY;
int[] arrived;
int[] junctions;
int i = 0;
i = junctions[0];
juncX[i] = robot.getLocationX();
juncY[i] = robot.getLocationY();
arrived[i] = robot.getHeading();
junctions[0]++;
return i;
}
}
当我尝试在我的主课中调用它时,使用
public class Test
{
public void controlRobot(IRobot robot)
{
int recordjunction = junctionRecorder(robot);
//...
它出现了这个错误
Test.java:7: cannot find symbol
symbol : method junctionRecorder
任何人都可以帮忙吗?