网友您好, 请在下方输入框内输入要搜索的题目:
题目内容
(请给出正确答案)
10.publicclassHello{11.Stringtitle;12.intvalue;13.publicHello(){14.title+=World”;15.}16.publicHello(intvalue){17.this.value=value;18.title=Hello”;19.Hello();20.}21.}and:30.Helloc=newHello(5);31.System.out.println(c.title);Whatistheresult?()
A.Hello
B.HelloWorld
C.Compilationfails.
D.HelloWorld5
E.Thecoderunswithnooutput.
F.Anexceptionisthrownatruntime.
参考答案
更多 “ 10.publicclassHello{11.Stringtitle;12.intvalue;13.publicHello(){14.title+=World”;15.}16.publicHello(intvalue){17.this.value=value;18.title=Hello”;19.Hello();20.}21.}and:30.Helloc=newHello(5);31.System.out.println(c.title);Whatistheresult?()A.HelloB.HelloWorldC.Compilationfails.D.HelloWorld5E.Thecoderunswithnooutput.F.Anexceptionisthrownatruntime. ” 相关考题
考题
下列语句中,正确的是( )。A.char*myString="Hello-World!";B.char myString="Hello-World!";C.char myString[11]="Hello-World!";D.char myString[12]="Hello-World!";
考题
下列字符型常量Hello,world!表示方法中,错误的是______。A.[Hello,world!]B.'Hello,wOrld!'C.Hello,world!,D.{Hello,world!}
考题
下列程序段的输出结果是 String MyStr = "Hello,"; MyStr = MyStr + "World!"; System.out.println(MyStr);A.Hello,World!B.Hello,C.World!D.该程序段有语法错误
考题
下列程序段的输出结果是 ( ) String MyStr="Hello,"; MyStr=MyStr+"World!"; System.out.println(MyStr);A.Hello,World!B.Hello.C.World!D.该程序段有语法错误
考题
下列语句中正确的是A.char*myString="Hello-World!";B.char myString="Hello-World!";C.char myString[11]=”Hello-World!”;D.char nlyString[12]="Hello-World!";
考题
以下定义常量不正确的语句是()AConst Num As Integer=200BConst Num1 As Long=200, Sstr$="World"CConst Sstr$="World"DConst Num$=#World#
考题
13、Java程序向显示器输出信息“Hello, World”,下列哪种写法是错误的?A.System.out.print(“Hello, world” );B.System.out.println(“Hello, world” );C.System.out.print(“Hello, world\n” );D.printf(“Hello, world\n” );
考题
下列定义字符串类string对象的语句中,错误的是()。A.string str;B.string str(“Hello, world” );C.string str = “Hello, world”;D.string str = ‘Hello, world’;
热门标签
最新试卷