- 如今个人心理调节能力真是强悍啊,看了那么多书和文章,果真是有用的。
- 有好朋友的感受真好!哈哈!
Test.main() 函数执行后的输出是(D)
A. 11 17 34
B. 22 74 74
C. 6 7 7
D. 22 34 17java
大神解析函数
以下代码的输出结果是什么?(编译错误)spa
public class Test { public int aMethod(){ static int i = 0; i++; return i; } public static void main(String args[]){ Test test = new Test(); test.aMethod(); int j = test.aMethod(); System.out.println(j); } }
Java中静态变量只能在类主体中定义,不能在方法中定义。 静态变量属于类全部而不属于方法。