下面程序段的输出结果为 package test; public class ClassA { int x=20; static int y=6; public static void main(String args[]) { ClassB b=new ClassB( ); b.go(10); System.out.println("x="+b.x); } } class ClassB { int x; void go(int y) { ClassA a=new ClassA( ); x=a.y; } }
题库:计算机等级考试
类型:最佳选择题
时间:2017-07-03 17:07:59
免费下载:《单选题》Word试卷
下面程序段的输出结果为 package test; public class ClassA { int x=20; static int y=6; public static void main(String args[]) { ClassB b=new ClassB( ); 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.编译不通过
本题关键词:输出结果,输出段梗阻,行为结果,空肠输出段梗,面试程序,行为结果评价,竣工结算程序,结果,行为手段,肝糖输出;