搜题
用户您好, 请在下方输入框内搜索其它题目:
搜题
题目内容 (请给出正确答案)
提问人:网友 发布时间:
【单选题】

public&ensp;static&ensp;Iterator&ensp;reverse(List&ensp;list)&ensp;{&ensp;<br /> Collections.reverse(list);&ensp;<br /> return&ensp;list.iterator();&ensp;<br /> }&ensp;<br /> public&ensp;static&ensp;void&ensp;main(String[]&ensp;args)&ensp;{&ensp;<br /> List&ensp;list&ensp;=&ensp;new&ensp;ArrayList();&ensp;<br /> list.add(&rdquo;&ensp;1&rdquo;);&ensp;list.add(&rdquo;2&rdquo;);&ensp;list.add(&rdquo;3&rdquo;);&ensp;<br /> for&ensp;(Object&ensp;obj:&ensp;reverse(list))&ensp;<br /> System.out.print(obj&ensp;+&ensp;&ldquo;,&rdquo;);&ensp;<br /> }&ensp;<br /> What&ensp;is&ensp;the&ensp;result?()&ensp;

A、 3,2,1,

B、 1,2,3,

C、 Compilation fails.

D、 The code runs with no output.

E、 An exception is thrown at runtime.

更多“ public&ensp;static&ensp;Iterator&ensp;reverse(List&ensp;list)&ensp;{&ensp;<br /> Collections.reverse(list);&ensp;<br /> return&ensp;list.iterator();&ensp;<br /> }&ensp;<br /> public&ensp;static&ensp;void&ensp;main(String[]&ensp;args)&ensp;{&ensp;<br /> List&ensp;list&ensp;=&ensp;new&ensp;ArrayList();&ensp;<br /> list.add(&rdquo;&ensp;1&rdquo;);&ensp;list.add(&rdquo;2&rdquo;);&ensp;list.add(&rdquo;3&rdquo;);&ensp;<br /> for&ensp;(Object&ensp;obj:&ensp;reverse(list))&ensp;<br /> System.out.print(obj&ensp;+&ensp;&ldquo;,&rdquo;);&ensp;<br /> }&ensp;<br /> What&ensp;is&ensp;the&ensp;result?()&ensp;”相关的问题
第1题

A、&ensp;public&ensp;static  B、&ensp;public&ensp;static&ensp;final  C、&ensp;final  D、&ensp;public&ensp;static&ensp;abstract  

点击查看答案
第2题

A、A.&ensp;public&ensp;static&ensp;void&ensp;main(String[]&ensp;args){}  B、B.&ensp;public&ensp;static&ensp;void&ensp;main(){}  C、C.&ensp;public&ensp;static&ensp;void&ensp;main(String&ensp;args[]){}  D、D.&ensp;public&ensp;void&ensp;static&ensp;main(String[]&ensp;args){}  

点击查看答案
第3题

A、&ensp;public&ensp;static&ensp;void&ensp;main(String[]&ensp;args){}  B、&ensp;public&ensp;static&ensp;void&ensp;main(String&ensp;args){}  C、&ensp;public&ensp;void&ensp;main(String[]&ensp;args){}  D、&ensp;public&ensp;static&ensp;int&ensp;main(String[]&ensp;args){}  

点击查看答案
第5题

A、public&ensp;void&ensp;main(String&ensp;args[])  B、public&ensp;void&ensp;static&ensp;main(String&ensp;args[])  C、public&ensp;static&ensp;main(String[]&ensp;argv)  D、final&ensp;public&ensp;static&ensp;void&ensp;main(String&ensp;[]&ensp;array)  E、public&ensp;static&ensp;void&ensp;main(String&ensp;args[])  

点击查看答案
第7题

A、public&ensp;&ensp;static&ensp;&ensp;void&ensp;&ensp;main(&ensp;)  B、public&ensp;&ensp;static&ensp;&ensp;void&ensp;&ensp;&ensp;main(&ensp;String&ensp;&ensp;args[]&ensp;)  C、public&ensp;static&ensp;int&ensp;&ensp;main(String&ensp;&ensp;[]&ensp;arg&ensp;)  D、public&ensp;&ensp;void&ensp;&ensp;main(String&ensp;&ensp;arg[]&ensp;)  

点击查看答案
第8题

A、A.public&ensp;static&ensp;void&ensp;main(String[]&ensp;args)  B、B.public&ensp;static&ensp;int&ensp;main(String[]&ensp;args)  C、C.public&ensp;void&ensp;main(String[]&ensp;args)  D、D.public&ensp;int&ensp;main(String[]&ensp;args)  

点击查看答案
第10题

A、&ensp;public&ensp;main(String&ensp;args[])  B、&ensp;public&ensp;static&ensp;void&ensp;main(String&ensp;args[])  C、&ensp;private&ensp;static&ensp;void&ensp;main(String&ensp;args[])  D、&ensp;void&ensp;main()  

点击查看答案
客服
TOP

请使用微信扫码支付

订单号:
遇到问题请联系在线客服