The term commonly is used to refer to a string that is part of another string.(术语___通常指的是另一个字符串的一部分)
A. strand (链)
B. substring(子串)
C. character fragment (字符片段)
D. nested string (嵌套的字符串)
查看答案
What will be printed after the following code is executed?(下列代码执行后打印的结果是?)String str = "abc456"; int m = 0;while ( m < 6 ){if (Character.isLetter(str.charAt(m))) System.out.print(Character.toUpperCase(str.charAt(m)));m++;}
A. abc456
B. ABC456
C. ABC
D. 456
Assuming that str is declared as follows, (假设str声明如下)String str = "RSTUVWXYZ";What value will be returned from str.charAt(5)? (将从str.charAt(5)返回什么值?)
A. U
B. V
C. W
D. X
What will be the value of matches after the following code is executed? (执行以下代码后,匹配的值是多少?)boolean matches;String[] productCodes = {"456HI345", "3456hj"}; matches = productCodes[0].regionMatches(true, 1,productCodes[1], 2, 3);
A. 56H
B. 56h
C. true
D. false
What will be the value of loc after the following code is executed?(执行下列代码后,loc的值是多少?)int loc;String str = "The cow jumped over the moon."; loc = str.indexOf("ov");
A. 15
B. 16
C. 17
D. 18