题目内容 (请给出正确答案)
[主观题]

下面程序的运行结果是____ public static void main(String [] args) { int a[][]={{1,2,3},{4,5,6}}; System.out.println(a[1][1]); }

A、A. 3

B、B. 4

C、C. 5

D、D. 6

提问人:网友wwgg4048 发布时间:2022-01-07
参考答案
查看官方参考答案
如搜索结果不匹配,请 联系老师 获取答案
更多“下面程序的运行结果是____ public static v…”相关的问题
第1题
以下程序的输出结果为( )。 public static void main(String[] args) { for(int i=1;i<5;i++) { if(i%3="=0)" continue; system.out.println(i+ ""); }> A、1 2 4

B、1 2 3

C、1 2 1

D、2 3 4

点击查看答案
第2题
请阅读下面程序 publicclassThreadTest{ publicstaticvoidmain(Stringargs[])throwsException{ inti=0; Hellot=newHello(); ______, while(true){ System.out.println("GoodMoming"+i++); if(i==2&&t.isAlive()){ System.out.println("MainwaitingforHello!"); t.join();//等待t运行结束 } if(i==5)break;} } } classHelloextendsThread{ inti; publicvoidrun(){ while(true){ System.out.println("Hello"+i++); if(i==5)break;}}} 为使该程序正确执行, 下划线处的语句应是()。

A.t.sleep()

B.t.yield()

C.t.interrupt()

D.t.start()

点击查看答案
第3题
下列程序执行后之后,将会输出 ( ) 。 public class A { public static void main(String[] args){ int j = 0; for (int i = 3; i >= 0; i--) { j += i; System.out.print(j); } } }

A、3566

B、3522

C、6753

D、3255

点击查看答案
第4题
class Program { public static void Main(string[] args) { int[] a = new int[3] { 1, 2, 3 }; for (int i = 0; i < 3; i++) Console.Write("{0} ", a[i]); Console.WriteLine(); int[] b = a; for (int i = 0; i < 3; i++) b[i] = 2 * b[i]; for (int i = 0; i < 3; i++) Console.Write("{0} ", a[i]); Console.WriteLine(); Console.Read(); } }
点击查看答案
第5题

下面程序运行的结果是() class test { static void Main(string[] args) { Queue Q = new Queue(); Stack S = new Stack(); for (int i = 1; i <= 10; i++) q.enqueue(i); for (int i="1;i&lt;=10;i++)" if (i%2="=0)" s.push(q.dequeue()); s.count; console.write("{0},", s.pop()); } a、2,4,6,8,10, b、10,9,8, c、9,7,5,3,1, d、5,4,3 答案: d 2、下面程序运行的结果是() public test { string[] names="{" "a", "b", "c", "d","e" }; ienumerator> GetEnumerator() { for (int i = 0; i < 5; i++) yield return names[2*i+1]; } static void Main(string[] args) { test ts = new test(); foreach (string s in ts) Console.Write("{0},",s); } }

A、a,b,c,d,e

B、0,1,3

C、a,c,e

D、b,d

点击查看答案
第6题
class D2{ public static void main(String[] args){ int a=20,b=10; if(a < b) System.out.println("b is greater than a"); else System.out.println("a is greater than b"); } } 输出是: b is greater than a
点击查看答案
第7题
程序阅读题3 public class Kao2 { public static void main(String args[]) { int sum=0; for(int i=1;i<=100;i+=2) sum+="i;" system.out.println(sum); } sum的值最后是多少?>
点击查看答案
第8题
写出程序的运行结果 class Test5{ public static void main(String args[]) { int x = 5634; int s = 0; while (x>0) { s = s + x%10; x = x/10; } System.out.println("r="+s); } }
点击查看答案
第9题
下面的程序中,哪行会报错? public class StaticTest { int age; String name; static int totalFee = 500; public void showName() { System.out.print(this.name); } public static void showTotalFee() { line 1: System.out.print(totalFee); line 2: showName(); } public static void main(String[] args) { line3: StaticTest.showTotalFee(); } }

A、line 1

B、line 2

C、line 3

点击查看答案
账号:
你好,尊敬的用户
复制账号
发送账号至手机
密码将被重置
获取验证码
发送
温馨提示
该问题答案仅针对搜题卡用户开放,请点击购买搜题卡。
马上购买搜题卡
我已购买搜题卡, 登录账号 继续查看答案
重置密码
确认修改
欢迎分享答案

为鼓励登录用户提交答案,简答题每个月将会抽取一批参与作答的用户给予奖励,具体奖励活动请关注官方微信公众号:简答题

简答题官方微信公众号

警告:系统检测到您的账号存在安全风险

为了保护您的账号安全,请在“简答题”公众号进行验证,点击“官网服务”-“账号验证”后输入验证码“”完成验证,验证成功后方可继续查看答案!

微信搜一搜
简答题
点击打开微信
警告:系统检测到您的账号存在安全风险
抱歉,您的账号因涉嫌违反简答题购买须知被冻结。您可在“简答题”微信公众号中的“官网服务”-“账号解封申请”申请解封,或联系客服
微信搜一搜
简答题
点击打开微信