网友您好, 请在下方输入框内输入要搜索的题目:
题目内容
(请给出正确答案)
单选题
booleanendsWith(Strings)表示()
A
查找某字符串是否以s为结尾
B
查找某字符串是否与s完全匹配
C
确定某字符串与s的大小关系
D
确定某字符串是否以s为开始
参考答案
参考解析
解析:
暂无解析
更多 “单选题booleanendsWith(Strings)表示()A 查找某字符串是否以s为结尾B 查找某字符串是否与s完全匹配C 确定某字符串与s的大小关系D 确定某字符串是否以s为开始” 相关考题
考题
下面哪段语法执行正确()
A.Strings=Gonewiththewind;Stringt=good;Stringk=s+t;B.Strings=Gonewiththewind;Stringt;t=s[3]+one;C.Strings=Gonewiththewind;Stringstandard=s.toUpperCase();D.Strings=homedirectory;Stringt=s-directory;
考题
Giventhatcisareferencetoavalidjava.io.Consoleobject,whichtwocodefragmentsreadalineoftextfromtheconsole?()
A.Strings=c.readLine();B.char[]c=c.readLine();C.Strings=c.readConsole();D.char[]c=c.readConsole();E.Strings=c.readLine(%s,name);F.char[]c=c.readLine(%s,name);
考题
importjava.util.*;publicclassLetterASort{publicstaticvoidmain(String[]args){ArrayListstrings=newArrayList();strings.add(?aAaA”);strings.add(”AaA”);strings.add(?aAa”);strings.add(”AAaa”);Collections.sort(strings);for(Strings:strings){System.out.print(s+);}}}Whatistheresult?()A.Compilationfails.B.aAaAaAaAAaaAaAC.AAaaAaAaAaaAaAD.AaAAAaaaAaAaAaE.aAaAaAaAaAAAaaF.Anexceptionisthrownatruntime.
考题
importjava.util.*;publicclassWrappedString{privateStrings;publicWrappedString(Strings){this.s=s;}publicstaticvoidmain(String[]args){HashSeths=newHashSet();WrappedStringws1=newWrappedString(”aardvark”);WrappedStringws2=newWrappedString(”aardvark”);Strings1=newString(”aardvark”);Strings2=newString(”aardvark”);hs.add(ws1);hs.add(ws2);hs.add(s1);hs.add(s2);System.out.println(hs.size());}}Whatistheresult?()A.0B.1C.2D.3E.4F.Compilationfails.G.Anexceptionisthrownatruntime.
考题
publicclassX{publicstaticvoidmain(String[]args){strings=newstring(Hello”);modify(s);System.out.printIn(s);}publicstaticvoidmodify(Strings){s+=world!”;}}Whatistheresult?()
A.Theprogramrunsandprints“Hello”B.Anerrorcausescompilationtofail.C.Theprogramrunsandprints“Helloworld!”D.Theprogramrunsbutabortswithanexception.
考题
阅读下面程序 publicclass Operators AndExpressions{ voidequalsMethodl(){ Strings1=newString("howareyou"); Strings2=newString("howareyou"); System.out.println(s1==s2); } publicstaticvoidmain(Stringargs[]){ OperatorsAndExpressionsOperAndExp=newOperatorsAndExpressions (); //用于复合类型数据的“==”运算符 OperAndExp.equalsMethodl(); } } 程序运行结果是( )。A.==B.trueC.falseD.equal
考题
对于下面( )类定义,可以通过“newJ_Class()”生成类J_Class的实例对象。A、publicclassJ_Class{publicJ_Class(void){}}B、publicclassJ_Class{}C、publicclassJ_Class{publicJ_Class(Strings){}}D、publicclassJ_Class{publicvoidJ_Class(){}publicJ_Class(Strings){}
考题
下面这段代码会产生( )个String对象。Strings1="hello";Strings2=s1.substring(2,3);Strings3=s1.toString();Strings4=newStringBuffer(s1).toString();A、1B、2C、3D、4
考题
A tow of 9 barges is made up three abreast by three long. The towboat is faced up to the last barge of the center string. The outer two strings of barges are the ______.A.port and starboard stringsB.outer stringsC.drag stringsD.side strings
考题
import java.util.*; public class LetterASort { public static void main(String[] args) { ArrayList strings = new ArrayList(); strings.add(‟aAaA”); strings.add(”AaA”); strings.add(‟aAa”); strings.add(”AAaa”); Collections.sort(strings); for (String s: strings) { System.out.print(s + “ “); } } } What is the result?() A、 Compilation fails.B、 aAaA aAa AAaa AaAC、 AAaa AaA aAa aAaAD、 AaA AAaa aAaA aAaE、 aAa AaA aAaA AAaaF、 An exception is thrown at runtime.
考题
在java中,下列()语句不能通过编译。A、Strings="john"+"was"+"here";B、Strings="john"+3;C、floatf=5+5.5;D、inta=3+5;
考题
Strings="This is the";Stringt=s.concat("String.");t的内容是()A、This is the StringB、This is theC、String
考题
public static void main方法的参数描述正确的有()。A、String args[]B、String[] argsC、Strings args[]zD、String argsE、Strings arg[]
考题
如果需要把s="It,is,me"按照","分解,并赋给新的变量s1,下列语句正确的是()A、Strings1=newStringTokenizer(s);B、Strings1=newStringTokenizer(s,",");C、StringTokenizers1=newStringTokenizer("It,is,me");D、StringTokenizers1=newStringTokenizer(s,",");
考题
多选题1. import java.util.*; 2. public class Test { 3. public static void main(String[] args) { 4. List strings = new ArrayList(); 5. // insert code here 6. } 7. } Which four, inserted at line 5, will allow compilation to succeed?()AString s = strings.get(0);BIterator i1 = strings.iterator();CString[] array1 = strings.toArray();DIterator i2 = strings.iterator();EString[] array2 = strings.toArray(new String[1]);FIterator i3 = strings.iterator();
考题
单选题A tow of 9 barges is made up three abreast by three long. The towboat is faced up to the last barge of the center string. The outer two strings of barges are the().A
port and starboard stringsB
outer stringsC
drag stringsD
side strings
考题
单选题用于文本*区中设置文本同时清除文本*区中原有文本的方法是()A
setText(Strings)B
getText()C
TextArea(Strings)D
TextArea(intx,inty)
考题
单选题import java.util.*; public class LetterASort { public static void main(String[] args) { ArrayList strings = new ArrayList(); strings.add(‟aAaA”); strings.add(”AaA”); strings.add(‟aAa”); strings.add(”AAaa”); Collections.sort(strings); for (String s: strings) { System.out.print(s + “ “); } } } What is the result?()A
Compilation fails.B
aAaA aAa AAaa AaAC
AAaa AaA aAa aAaAD
AaA AAaa aAaA aAaE
aAa AaA aAaA AAaaF
An exception is thrown at runtime.
考题
单选题Strings="This is the";Stringt=s.concat("String.");t的内容是()A
This is the StringB
This is theC
String
考题
单选题booleanendsWith(Strings)表示()A
查找某字符串是否以s为结尾B
查找某字符串是否与s完全匹配C
确定某字符串与s的大小关系D
确定某字符串是否以s为开始
考题
单选题有如下程序段:inta=b=5;Strings1="祝你今天考出好成绩!";Strings2=s1;则表达式a==b与s2==s1的结果分别是:()。A
true与trueB
false与trueC
true与falseD
false与false
考题
单选题What authentication type is used by SNMPv2?()A
HMAC-MD5B
HMAC-SHAC
CBC-DESD
community strings
考题
单选题构成方法publicURL(Strings)中的参数s应表示为()A
一个网络协议B
一个文件C
包含网络协议、计算机域名的字符串D
操作系统名称
热门标签
最新试卷