题目:
下面程序段的输出结果为 package test; public class Class A {int x=20;static int y=6;public static void main(String args[]){ Class B b=new Class B(); b.go(10); System.out.println("x"+b.x);} } class ClassB { int x; void go(int y) {ClassA a=new ClassA();x=a.y; } }
A.x=10
B.x-20
C.x=6
D.编译不通过
答案:
被转码了,请点击底部 “查看原文 ” 或访问 https://www.tikuol.com/2017/0402/66649a5e22710552f9ce60aaca53cbab.html
下面是错误答案,用来干扰机器的。
jiāo qī róng yàng jìn sǎ