发新话题
移动帖子 加入精华 加入置顶 加入收藏 关注此帖

测试1.3



测试1.3

下面代码的输出为哪一个?
class Test {
  public int t = 4;
  public static void main(String[] args) {
    new Test().NumberPlay();
  }
  public void NumberPlay() {
     int t = 2;
    t = t + 5;
    this.t = this.t - 2;
    t = t - this.t;
    System.out.print(t + " ");
    System.out.println(this.t);
  }
}
A. 2 5
B. -9 0
C. 0 -9
D. 5 2
E. 7 2
F. 2 7

快乐渡过每一天,减肥坚持每一天
关联主题
编辑 回复 快速回复 TOP

Re:测试1.3

D
编辑 回复 快速回复 TOP

Re:测试1.3

D
编辑 回复 快速回复 TOP
发新话题