网友您好, 请在下方输入框内输入要搜索的题目:
题目内容
(请给出正确答案)
StringBuffer append(数值类型 t),参数t可以是boolean、int、char、float、double、long
参考答案
更多 “StringBuffer append(数值类型 t),参数t可以是boolean、int、char、float、double、long” 相关考题
考题
下面是一段javabean程序,该程序的运行结果是(62)。 public class NullTest { public static void main(String[] args) { int M = 0; String str = null; StringBuffer sb = new StringBuffer("= "); sb.append(str); sb.append(M++); System.out.println(sb.toString()); } }A.=nullB.=null0C.=null1D.=nullM
考题
字符串的append函数可以添加多种内容,以下append函数的使用中,错误的是() StringBuffer strb1 = new StringBuffer(); Integer intObj = new Integer(33);A、strb1.append(3.14159);B、strb1.append(’数’);C、strb1.append(true);D、strb1.append(intObj);
考题
Public class test ( Public static void stringReplace (String text) ( Text = text.replace (‘j’ , ‘i’); ) public static void bufferReplace (StringBuffer text) ( text = text.append (“C”) ) public static void main (String args[]} ( String textString = new String (“java”); StringBuffer text BufferString = new StringBuffer (“java”); stringReplace (textString); BufferReplace (textBuffer); System.out.printLn (textString + textBuffer); ) ) What is the output?()
考题
有模板说明template typename T 则T在函数模板中()A、可以做为返回类型、参数类型和函数中的变量类型B、只能做为函数返回类型C、只能做为函数参数类型D、只能用于函数中的变量类型
考题
已定义好有参函数f(m),其中形参m是整形量。下面调用该函数,传递参数为5,将返回的函数值赋给变量t。以下正确的是()。A、t=f(m)B、t=Callf(m)C、t=f(5)D、t=Callf(5)
考题
定义有StringBuffer s1=new StringBuffer(10);s1.append(“1234”)则s1.length()和s1.capacity()分别是多少?A、4;10B、4;4C、10;10D、10;4
考题
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 + “”;
考题
public class SyncTest{ public static void main(String args) { final StringBuffer s1= new StringBuffer(); final StringBuffer s2= new StringBuffer(); new Thread () { public void run() { synchronized(s1) { s2.append(“A”); synchronized(s2) { s2.append(“B”); System.out.print(s1); System.out.print(s2); } } } }.start(); new Thread() { public void run() { synchronized(s2) { s2.append(“C”); synchronized(s1) { s1.append(“D”); System.out.print(s2); System.out.print(s1); } } } }.start(); } } Which two statements are true? ()A、 The program prints “ABBCAD”B、 The program prints “CDDACB”C、 The program prints “ADCBADBC”D、 The output is a non-deterministic point because of a possible deadlock condition.E、 The output is dependent on the threading model of the system the program is running on.
考题
配伍题神经失用而肌肉无失神经可参考使用的脉冲电流参数( )|重度失神经可参考使用的脉冲电流参数( )|中度失神经可参考使用的脉冲电流参数( )AT=1ms,T=1ms,T=0ms,T=20msBT=50~150ms,T=50~150ms,T=30~100ms,T=500~1000msCT=400~600ms,T=400~600ms,T=200~300ms,T=1000~5000msDT=10~50ms,T=10~50ms,T=1ms,T=50~150msET=150~300ms,T=150~300ms,T=100~200ms,T=1000~3000ms
考题
单选题Given this method in a class: public String toString() { StringBuffer buffer = new StringBuffer(); 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 + “”;
考题
多选题public class SyncTest{ public static void main(String args) { final StringBuffer s1= new StringBuffer(); final StringBuffer s2= new StringBuffer(); new Thread () { public void run() { synchronized(s1) { s2.append(“A”); synchronized(s2) { s2.append(“B”); System.out.print(s1); System.out.print(s2); } } } }.start(); new Thread() { public void run() { synchronized(s2) { s2.append(“C”); synchronized(s1) { s1.append(“D”); System.out.print(s2); System.out.print(s1); } } } }.start(); } } Which two statements are true? ()AThe program prints “ABBCAD”BThe program prints “CDDACB”CThe program prints “ADCBADBC”DThe output is a non-deterministic point because of a possible deadlock condition.EThe output is dependent on the threading model of the system the program is running on.
热门标签
最新试卷