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

Given&ensp;this&ensp;method&ensp;in&ensp;a&ensp;class:&ensp;<br /> public&ensp;String&ensp;toString()&ensp;{&ensp;<br /> StringBuffer&ensp;buffer&ensp;=&ensp;new&ensp;StringBuffer();&ensp;<br /> buffer.append(&#8223;<&#8223;);&ensp;<br /> buffer.append(this.name);&ensp;<br /> buffer.append(&#8223;>&#8223;);&ensp;<br /> return&ensp;buffer.toString();&ensp;<br /> }&ensp;<br /> Which&ensp;is&ensp;true?()&ensp;

A、 This code is NOT thread-safe.

B、 The programmer can replace StringBuffer with StringBuilder with no other changes.

C、 This code will perform well and converting the code to use StringBuilder will not enhance the performance.

D、 This code will perform poorly. For better performance, the code should be rewritten: return “<“+ this.name + “>”;

更多“ Given&ensp;this&ensp;method&ensp;in&ensp;a&ensp;class:&ensp;<br /> public&ensp;String&ensp;toString()&ensp;{&ensp;<br /> StringBuffer&ensp;buffer&ensp;=&ensp;new&ensp;StringBuffer();&ensp;<br /> buffer.append(&#8223;<&#8223;);&ensp;<br /> buffer.append(this.name);&ensp;<br /> buffer.append(&#8223;>&#8223;);&ensp;<br /> return&ensp;buffer.toString();&ensp;<br /> }&ensp;<br /> Which&ensp;is&ensp;true?()&ensp;”相关的问题
第1题

A、java.lang.StackOverflowError  B、java.lang.IllegalStateException  C、java.lang.ExceptionInInitializerError  D、java.lang.ArrayIndexOutOfBoundsException  

点击查看答案
第2题

A、super(name,&ensp;baseSalary);  B、this.commission&ensp;=&ensp;commission;  C、super();&ensp;this.commission&ensp;=&ensp;commission;  D、this.commission&ensp;=&ensp;commission;&ensp;super();  E、super(name,&ensp;baseSalary);&ensp;this.commission&ensp;=&ensp;commission;  

点击查看答案
第3题

A、A.The&ensp;interface&ensp;must&ensp;be&ensp;configured&ensp;as&ensp;point-to-multipoint  B、B.The&ensp;sustained&ensp;cell&ensp;rate&ensp;and&ensp;the&ensp;burst&ensp;rate&ensp;are&ensp;equal  C、C.The&ensp;router's&ensp;configuration&ensp;will&ensp;also&ensp;include&ensp;a&ensp;Dialer&ensp;interface  D、D.The&ensp;configuration&ensp;must&ensp;also&ensp;include&ensp;a&ensp;sub-interface&ensp;with&ensp;a&ensp;VPI/VCI&ensp;of&ensp;8/35  

点击查看答案
第4题

A、A.This&ensp;device&ensp;is&ensp;configured&ensp;as&ensp;a&ensp;PPPoE&ensp;client  B、B.This&ensp;device&ensp;is&ensp;configured&ensp;as&ensp;a&ensp;PPPoA&ensp;client  C、C.This&ensp;device&ensp;is&ensp;configured&ensp;as&ensp;RFC&ensp;1483/2684bridge  D、D.This&ensp;device&ensp;is&ensp;configured&ensp;an&ensp;an&ensp;aggregation&ensp;router  

点击查看答案
第5题

A、public&ensp;void&ensp;foo()&ensp;{}  B、public&ensp;int&ensp;foo()&ensp;{&ensp;return&ensp;3;&ensp;}  C、public&ensp;Two&ensp;foo()&ensp;{&ensp;return&ensp;this;&ensp;}  D、public&ensp;One&ensp;foo()&ensp;{&ensp;return&ensp;this;&ensp;}  E、public&ensp;Object&ensp;foo()&ensp;{&ensp;return&ensp;this;&ensp;}  

点击查看答案
第6题

A、This&ensp;code&ensp;can&ensp;throw&ensp;an&ensp;InterruptedException.  B、This&ensp;code&ensp;can&ensp;throw&ensp;an&ensp;IllegalMonitorStateException.  C、This&ensp;code&ensp;can&ensp;throw&ensp;a&ensp;TimeoutException&ensp;after&ensp;ten&ensp;minutes.  D、Reversing&ensp;the&ensp;order&ensp;of&ensp;obj.wait()&ensp;and&ensp;obj.notify()&ensp;might&ensp;cause&ensp;this&ensp;method&ensp;to&ensp;complete&ensp;normally.  E、A&ensp;call&ensp;to&ensp;notify()&ensp;or&ensp;notifyAll()&ensp;from&ensp;another&ensp;thread&ensp;might&ensp;cause&ensp;this&ensp;method&ensp;to&ensp;complete&ensp;normally.  

点击查看答案
客服
TOP

请使用微信扫码支付

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