public class Test02 { public static void main(String[] args){ int x = 5; System.out.println(x); } }
这个时候int前面是不能加static的
public class Test02 { static int x = 5; public static void main(String[] args){ System.out.println(x); } }
原文:http://blog.csdn.net/lyy98521/article/details/46315207