A.s>>>=3;
B.int i=s.length();
C.s[3]=”x”;
D.String short_s=s.trim();
E.String t=”root”+s;
第1题:
A.s += "books";
B.char c = s[1];
C.int len = s.length;
D.String t = s.toLowerCase();
第2题:


A.String regex="";
B.String regex=" .";
C.String regex=".*";
D.String regex="\\s";
E.String regex="\\.\\s*";
F.String regex="\\w[\.]+";
第3题:
下列哪个程序段可能导致错误?
A.String s="hello"; String t= "good"; String k=s+ t;
B.String s="hello"; String t; t=s[3]+"one";
C.String s="hello"; String standard=s. toUpperCase
D.String s="hello"; String t =s+ "good"
第4题:
下列语句能给数组赋值,而不使用for循环的是
A.myArray{[1]="One";[2]="Two";[3]="Three";}
B.String s[5]=new String[] {"Zero","One","Two","Three","Four"};
C.String s[]=new String[] {"Zero","One","Two","Three","Four"};
D.String s[]=new String[]= {"Zero","One","Two","Three","Four"};
第5题:
下列的( )程序段可能导致错误。
A.String s="hello": Sting t="good"; String k=s+t;
B.Sting s="hello"; String t; t=s [3] + "one";
C.Sting s="hello"; String standard=s.toUpperCase( );
D.String s="hello": Stringt s +"good";
第6题:
下面的哪些程序片断可能导致错误()
第7题:
下面哪个语句是正确的()
第8题:
设有定义:String s=“World”;,下列语句错误的是()。
第9题:
已知Strings=“Java”,则下面哪些代码是正确的()
第10题:
int i=s.length();
s>>>=3;
String ts=s.trim();
String t=s+”!”
第11题:
String s = Gone with the wind;String t = good ;String k = s + t;
String s = Gone with the wind;String t; t = s[3] + one;
String s = Gone with the wind;String standard = s.toUpperCase();
String s = home directory;String t = s - directory;
第12题:
s=s+1;
char c=s[3];
int i=s.length;
String t=s+new Object();
第13题:
顺序执行下列两条语句,输出结果是______。
String s="You are a pretty boy!";System.out.println(s.length( ));
第14题:
下列的哪个程序段可能导致错误? ( )
A.String s="hello"; String t="good"; String k=s+t;
B.String s="hello"; String t; t=s[3]+"one";
C.String s="hello"; String standard=s.toUpperCase();
D.String s="hello"; String t=s+"good";
第15题:
下列语句能给数组赋值而不使用for循环的是
A.myArray{[1]="One";[2]="Two";[3]="Three";}
B.String s[5]=new String[]{"Zero", "One", "Two", "There", "Four"};
C.String s[]=new String[]{"Zero", "One", "Two", "There", "Four"};
D.String s[]=new String[]=|"Zero", "One", "Two", "There", "Four"};
第16题:
下面的表达式中正确的是 ( )
A.String s=“你好”;int i=3;s+=i;
B.String s=“你好”;int i=3;if(i==s){s+=i};
C.String s=“你好”;int i=3;s=i+s;
D.String s=“你好”;int i=3; s=i+;
第17题:
下列的哪个程序段可能导致错误?
A.String s = "hello"; String t = "good"; String k = s + t;
B.String s = "hello"; String t; t = s[3] + "one";
C.String s = " hello "; String standard = s.toUpperCase( );
D.String s = "hello"; String t = s + "good";
第18题:
下面哪段语法执行正确()
第19题:
下面哪个是对字符串String的正确定义()。
第20题:
有语句String s=”hello world”; ,以下操作哪个是不合法的()
第21题:
Which of the following fragments might cause errors?()
第22题:
String s = “Gone with the wind”; String t = “ good”; String k = s + t;
String s = “Gone with the wind”; String t; t = s[3] + “one”;
String s = “Gone with the wind”; String standard = s.toUpperCase();
String s = “home directory”; String t = s – “directory”;
第23题:
inti=s.length()
s>>>=3
Stringts=s.trim()
Stringt=s+”!”