为什么main前面要加static?不加就无法运行(代码如下)
package wang;
public class wei {
int a=2;
static int b=2;
public static class in{
int b=1;
public void test(){
System.out.println(new wei().a);
}
}
public void main(String[] args) {
in si=new in();
si.test();
}
}