网友您好, 请在下方输入框内输入要搜索的题目:
题目内容
(请给出正确答案)
单选题
有语句String s=”hello world”; ,以下操作哪个是不合法的()
A
int i=s.length();
B
s>>>=3;
C
String ts=s.trim();
D
String t=s+”!”
参考答案
参考解析
解析:
暂无解析
更多 “单选题有语句String s=”hello world”; ,以下操作哪个是不合法的()A int i=s.length();B s=3;C String ts=s.trim();D String t=s+”!”” 相关考题
考题
下列程序段的输出结果是( )。 String MyStr="Hello,"; MyStr=MyStr+ "World!"; System.out.println(MyStr);A.Hello, World!B.Hello,C.World!D.该程序段有语法错误
考题
假设有以下代码: String s="hello"; String t="hello"; char c[ ]={'h','e','l','l','o'}; 下列选项中,返回false的语句是______。A.s.equals(t);B.t.equals(c);C.s==t;D.t.equals(new String("hello"));
考题
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.
考题
下列的哪个程序段可能导致错误? ( )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";
考题
下列哪个程序段可能导致错误?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. toUpperCaseD.String s="hello"; String t =s+ "good"
考题
给出下列的代码,则以下哪个选项返回true? String s="hello"; String t="hello"; char c []= {'h','e','1','1','o'};A)s.equals(t);A.t. equals(B.;C.s==t;D.t==c;
考题
下列程序段的输出结果是 String MyStr = "Hello,"; MyStr = MyStr + "World!"; System.out.println(MyStr);A.Hello,World!B.Hello,C.World!D.该程序段有语法错误
考题
在C++语言中输出“Hello World”的语句是()。A.cout>"Hello World";C.cin
在C++语言中输出“Hello World”的语句是( )。A.cout<<"Hello World";B.cout>>"Hello World";C.cin<<"Hello World";D.cin>>"Hello World";
考题
给出下列的代码则以下哪个选项返回true? String s = "hello" ; String s = "hello" ; char c[] = { 'h' ,'e','l','o'};A.s.equals(t);B.t.equals(c);C.s = =tD.t = = c;
考题
下列的哪个程序段可能导致错误?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";
考题
向页面输出Hello World的JavaScript语句是( )。 A.printf(Hello WorldHello World的JavaScript语句是( )。A.printf(Hello World) B.document.write(Hello World)C.h4Hello World/h4 D.alert(Hello World)
考题
向页面输出“Hello World”的JavaScript语句是()。
A.printf("Hello World")
B.document.write("Hello World")
C.Hello World
D.alert("Hello World")
考题
下列选项中,()是正确的表达式。 A、% String s = “hello world ” ;% B、% = “hello world ” ;% C、% = “hello world ” % D、% ! “hello world ” %
考题
设String对象s="H",运行语句System.out.println(s.concat("ello!"));后String对象s的内容为"Hello!",所以语句输出为"Hello!"。
考题
语句PrintFormat(“Hello World”,“”)的输出结果是()。A、hello WORLDB、hello worldC、HELLO WORLDD、HELLO world
考题
有语句String s=”hello world”; ,以下操作哪个是不合法的()A、int i=s.length();B、s=3;C、String ts=s.trim();D、String t=s+”!”
考题
java中 String str = "hello world"下列语句错误的是()。A、str+=’ a’B、int strlen = str.lengthC、str=100D、str=str+100
考题
public class X { public static void main (String[]args) { string s = new string (“Hello”); modify(s); System.out.printIn(s); } public static void modify (String s) { s += “world!”; } } What is the result?() A、 The program runs and prints “Hello”B、 An error causes compilation to fail.C、 The program runs and prints “Hello world!”D、 The program runs but aborts with an exception.
考题
public class X { public static void main (Stringargs) { string s = new string (“Hello”); modify(s); System.out.printIn(s); } public static void modify (String s) { s += “world!”; } } What is the result?() A、The program runs and prints “Hello”B、An error causes compilation to fail.C、The program runs and prints “Hello world!”D、The program runs but aborts with an exception.
考题
单选题public class X { public static void main (Stringargs) { string s = new string (“Hello”); modify(s); System.out.printIn(s); } public static void modify (String s) { s += “world!”; } } What is the result?()A
The program runs and prints “Hello”B
An error causes compilation to fail.C
The program runs and prints “Hello world!”D
The program runs but aborts with an exception.
考题
判断题设String对象s="H",运行语句System.out.println(s.concat("ello!"));后String对象s的内容为"Hello!",所以语句输出为"Hello!"。A
对B
错
考题
单选题public class X { public static void main (String[]args) { string s = new string (“Hello”); modify(s); System.out.printIn(s); } public static void modify (String s) { s += “world!”; } } What is the result?()A
The program runs and prints “Hello”B
An error causes compilation to fail.C
The program runs and prints “Hello world!”D
The program runs but aborts with an exception.
考题
单选题有语句Strings=”helloworld”;,以下操作哪个是不合法的?()A
inti=s.length()B
s=3C
Stringts=s.trim()D
Stringt=s+”!”
考题
单选题下列选项中,()是正确的表达式。A
% String s = “hello world ” ;% B
% = “hello world ” ;% C
% = “hello world ” % D
% ! “hello world ” %
热门标签
最新试卷