当前位置:SCJP程序员认证考试题库

问题:

[单选]

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 + “>”;

努力一定有好结果 外汇投资者要承受的风险主要有()。 汇率风险。 政治风险。 利率风险。 信用风险。 后张法预应力混凝土连续梁施工中,曲线预应力孔道的波峰部位应留()。 溢浆孔。 压浆孔。 排气孔。 排水孔。 清代通政司的职掌有哪些? 超声波法可以检测混凝土的() 表观质量。 内部损伤原因。 均匀性。 弹性模量。

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?() 

参考答案:

  参考解析

本题暂无解析

在线 客服