Java错误:在一个非常简单的程序中找不到符号

时间:2013-12-27 16:12:40

标签: java compiler-errors

我最近开始用Java编程。我已经制作了一些关于课程和所有内容的简单程序,但是这个让我很难过,而且我不知道我做错了什么。

public class Plane {
    int numberOfRows = 27;
    int [][] row1 = new int [numberOfRows][3];
    int [][] row2 = new int [numberOfRows][3];

    public void airPlane() {
        for(int i = 0; i < numberOfRows; i++) {
            System.out.print(row1[i]+"  ");
            System.out.print(row2[i]+"  ");
            System.out.println();
        }
    }
}

public class Main {
    public static void main() {
        Plane airPlane = new Plane();
        airPlane.airPlane();
    }
}

每次我尝试运行它都会给我

    Main.java:8: error: cannot find symbol
        Plane airPlane = new Plane();
        ^
  symbol:   class Plane 
  location: class Main

Main.java:8: error: cannot find symbol
        Plane airPlane = new Plane();
                             ^
  symbol:   class Plane
  location: class Main
2 errors

0 个答案:

没有答案