执行以下代码会输出什么结果?() public class Test { StringgetStr(String s){ return s + “hello”; } public static void main(String arg[]) { Test t= new Test(); System.out.println(t.getStr(“LiLei\n”)); } }
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?()
表达式”hello” instanceof String返回的值是哪项?()
表达式"hello" instance of String返回的值是哪项?()
Which expressions will evaluate to true if preceded by the following code?() String a = "hello"; String b = new String(a); String c = a; char[] d = { ’h’, ’e’, ’l’, ’l’, ’o’ };
Which SELECT statement will the result ‘ello World’ from the string ‘Hello World’?()
String s= "hello"; String t = "hello"; char c[] = {’h’,’e’,’l’,’l’,’o’} ; Which return true?()
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?()
Assuming that string1 = “hello” and string2 = “hello world”, Which of the following returns 0?
写出以下程序运行后的输出结果。 #includestdio.h #include string.h int main() { char st[20]={hello\0\t\\\}; printf(%d,%d\n,strlen(st),sizeof(st)); return 0; }
智慧职教: 设有以下字符串定义,则数组s1和s2( )。char s1[]={ 'S' ,'t', 'r' ,'i','n', 'g'};char s2[]= String;
如下这段代码执行后,字符串s的值是________?String s=”hello”;s.concat(“mrs”);s.toUpperCase();s+=” there”;
分析如下所示的Java代码,则选项中的说法正确的是( )。 class Parent{ public String name; public Parent(String pName){ this.name = pName; } } public class Test extends Parent { //1 public Test(String Name){ //2 name=\hello
下列程序段的输出结果是String MyStr = "Hello,";MyStr = MyStr + "World!";System.out.println(
下列程序段的输出结果是()。String MyStr="Hello,";MyStr=MyStr+"World!";Sysmm.out.println(MySt
Strings="Thisisthe";Stringt=s.concat("String.");t的内容是()
执行下面语句后,输出结果是()String s=""hello,World!"";System.out.println(s.length()); A、12B、14C、16D、18
有如下类和对象的定义:class MyHello{public:static string getName() { return "Hello"; }};MyHello my;下列各组语句中,能输出“Hello”的是()。
下列的哪个程序段可能导致错误?()A.String s="hello"; String t="good"; String k=s+t;B.String
使下列程序正常运行并且输出“Hello!”,横线处应填写的内容是()。 class Test { public static void main(string[]args){ Test t=new Test; start; } Public void run{ System.out.println("Hello!¨); )
StringBuffer str=new StringBuffer(25);String s=”Hello”,若执行语句str.append(s)后,str.length()和str.capacity()的返回值为()。
下列程序的运行结果是 【15】 。 import java.io.*; public class test public static void main(String arg) String s1="Hello!”; System.out.pnntln(s1.toUpperCase()); HELLO!
请阅读下面程序 public class ThreadTest { public static void main(String args) throws Exception{int i=0;Hello t=new Hello();while(true) { System.out.println("Good Moming"+i++); if (i==2 && t.isAlive()) {Syste
以下代码中包含错误。请指出所有有错误的代码行数 class S { int x = 7; std::string s{"Hello"}; public: S() { } void S(int x) { this->x = x; } };