写了一点java的程序,结果报错 The method main cannot be declared static; static methods can only be declared in a static or top level type,找了好长时间,结果是上一个类,少写了一个大括号 “}”  ,然后就一直报错。加上一个大括号,就可以了。