public class Test { public static void main(String[] args) { int x = 1; int[] y = new int[10]; m(x,y); System.out.println(" x is " + x); System.out.println(" y[0] is " + y[0]); } public static void m(int number , int[] numbers){ number = 100; numbers[0] = 5; } } 输出结果: x is 1 y[0] is
第1题
A.2
B.3
C.5
D.23
第2题
A.Anerroratline11causescompilationtofail.
B.Errorsatlines7and8causecompilationtofail.
C.Theprogramprintspairsofvaluesforxandythatmightnotalwaysbethesameonthesameline(forexample,“x=2,y=1”)
D.Theprogramprintspairsofvaluesforxandythatarealwaysthesameonthesameline(forexample,“x=1,y=1”.Inaddition,eachvalueappearstwice(forexample,“x=1,y=1”followedby“x=1,y=1”)
E.Theprogramprintspairsofvaluesforxandythatarealwaysthesameonthesameline(forexample,“x=1,y=1”.Inaddition,eachvalueappearstwice(forexample,“x=1,y=1”followedby“x=2s,y=2”)
第3题
A.Line16isneverexecuted.
B.Anexceptionisthrownatruntime.
C.Line13createsaFileobjectnamed“d”.
D.Line14createsaFileobjectnamed“f?.
E.Line13createsadirectorynamed“d”inthefilesystem.
F.Line16createsadirectorynamed“d”andafile “f” withinitinthefilesystem.
G.Line14createsafilenamed"f " insideofthedirectorynamed“d”inthefilesystem.
第4题
A.x=10
B.x=20
C.x=6
D.编译不通过
第5题
A.Errorsatlines7and8causecompilationtofail.
B.Theprogramprintspairsofvaluesforxandythatmightnotalwaysbethesameonthesameline(forexample,“x=2,y=1”).
C.Theprogramprintspairsofvaluesforxandythatarealwaysthesameonthesameline(forexample,“x=1,y=1”.Inaddition,eachvalueappearstwice(forexample,“x=1,y=1”followedby“x=1,y=1”).
D.Theprogramprintspairsofvaluesforxandythatarealwaysthesameonthesameline(forexample,“x=1,y=1”.Inaddition,eachvalueappearsonlyforonce(forexample,“x=1,y=1”followedby“x=2,y=2”).
第6题
A.1
B.2
C.3
D.编译失败
第7题
为了保护您的账号安全,请在“上学吧”公众号进行验证,点击“官网服务”-“账号验证”后输入验证码“”完成验证,验证成功后方可继续查看答案!