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

public&ensp;static&ensp;void&ensp;test(String&ensp;str)&ensp;{<br /> int&ensp;check&ensp;=&ensp;4;&ensp;<br /> if&ensp;(check&ensp;=&ensp;str.length())&ensp;{&ensp;<br /> System.out.print(str.charAt(check&ensp;-=&ensp;1)&ensp;+&ldquo;,&ensp;&ldquo;);&ensp;<br /> }&ensp;else&ensp;{&ensp;<br /> System.out.print(str.charAt(0)&ensp;+&ensp;&ldquo;,&ensp;&ldquo;);&ensp;<br /> }&ensp;<br /> }&ensp;<br /> and&ensp;the&ensp;invocation:&ensp;<br /> test(&rdquo;four&rdquo;);&ensp;<br /> test(&rdquo;tee&rdquo;);<br /> test(&rdquo;to&rdquo;);&ensp;<br /> What&ensp;is&ensp;the&ensp;result?()&ensp;

A、 r, t, t,

B、 r, e, o,

C、 Compilation fails.

D、 An exception is thrown at runtime.

更多“ public&ensp;static&ensp;void&ensp;test(String&ensp;str)&ensp;{<br /> int&ensp;check&ensp;=&ensp;4;&ensp;<br /> if&ensp;(check&ensp;=&ensp;str.length())&ensp;{&ensp;<br /> System.out.print(str.charAt(check&ensp;-=&ensp;1)&ensp;+&ldquo;,&ensp;&ldquo;);&ensp;<br /> }&ensp;else&ensp;{&ensp;<br /> System.out.print(str.charAt(0)&ensp;+&ensp;&ldquo;,&ensp;&ldquo;);&ensp;<br /> }&ensp;<br /> }&ensp;<br /> and&ensp;the&ensp;invocation:&ensp;<br /> test(&rdquo;four&rdquo;);&ensp;<br /> test(&rdquo;tee&rdquo;);<br /> test(&rdquo;to&rdquo;);&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

请使用微信扫码支付

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