0
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); 
    }
}
  • A、0
  • B、1
  • C、2
  • D、编译失败
回答后才能看到答案和解析
3202 138
5年前上传
1个回答
我的回答