试题详情
- 单项选择题 Given this method in a class: public String toString() { StringBuffer buffer = new StringBuffer(); buffer.append(‟<‟); buffer.append(this.name); buffer.append(‟>‟); return buffer.toString(); } Which is true?()
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 + “>”;
- B
关注下方微信公众号,在线模考后查看
热门试题
- public class&e
- You are b
- 针对以下代码,哪些说法是正确的:()。
- public class&e
- A developer&en
- 如何在面板中添加组件?()
- public class&e
- 如何创建有模式的对话框?()
- 下面的说法正确的是()
- 有一个n*m的矩阵,编写程序,找出其中最
- 下列有关抽象类的叙述正确的是哪项?()&
- 1. import&ensp
- 编写一个Java程序将当100,101,
- A web bro
- 在linux编程中,以下哪个TCP的套接
- 简述Java语言有什么特点?
- Assuming that&
- HTTPS是使用()来保证信息安全的。
- Which statement
- You want