private static int x =getvalue();
private static int y=5;
public static int getvalue(){return y;}
public static void main(String[] args)
{
System.out.println(x);
}
}
x 打印出来0 为什么?? 请讲解一下。
...全文
10312打赏收藏
基本变量 赋值的问题,请指点一下
public class C02 { private static int x =getvalue(); private static int y=5; public static int getvalue(){return y;} public static void main(String[] args) { System.out.println(x); } } x 打印出来0 为什么?? 请讲解一下。