String s=”Example String”; 下面哪些语句是正确的?() A.s>>>=3;B.int i=s.length();C.s[3]=”x”;D.String short_s=s.trim();E.String t=”root”+s;

String s=”Example String”; 下面哪些语句是正确的?()

A.s>>>=3;

B.int i=s.length();

C.s[3]=”x”;

D.String short_s=s.trim();

E.String t=”root”+s;


相关考题:

关于slice或map操作,下面正确的是() A.var s []ints = append(s,1)B.var m map[string]intm["one"] = 1C.var s []ints = make([]int, 0)s = append(s,1)D.var m map[string]intm = make(map[string]int)m["one"] = 1

下面main()方法的定义哪些是正确的()。A.publicstaticvoidmain(Stringargs[]){}B.publicstaticvoidmain(String[]){}C.publicstaticvoidmain(String[]args){}D.publicstaticvoidmain(String[]x){}

若输入 "I am a boy!",下列程序的运行结果为______。 char connect(string1,string2,string) char string1[],string2[],string[]; { int i,j; for (i=0;stringl[i] !='\0';i++) string[i]=stringl[i]; for (j=0;string2[j] !='\0';j++) string[i+j]=string2[j]; string[i+j ] ='\0'; } main ( ) { char s1 [100] , s2 [100] , s [100]; printf ("\n 输入 string1: \n"); scanf("%s",s1); printf (" \n 输入 string2: \n" ); scanf ("%s", s2); connect (s1, s2, s); printf ("%s\n", s); }A.I am a boy!B.输入string2:C.I amD.I am a boy!

给定如下Java代码,编译运行的结果是()。 public class Test { public static void main(String[] args) { Map<String, String> map = new HashMap<String, String>(); String s = "code"; map.put(s, "1"); map.put(s, "2"); System.out.println(map.size()); } }A.编译时发生错误B.运行时引发异常C.正确运行,输出:1D.正确运行,输出:2

请问如下哪些语句正确?(多选) A: String s1=”abc”; String s2=”abc”;则s1= =s2 B: String[] s=”abc”; C: new String s=”abc”; D: String s=new String(“abc”);A.String s1=”abc”; String s2=”abc”;则s1= =s2B.String[] s=”abc”;C.new String s=”abc”;D.String s=new String(“abc”);

下面数组的声明和创建()是正确的。A.String [][]a=new String[4][4];B.String [][]a=new String[][4];C.String [4][4]a=new String[][];D.String [][]a=new String[][];

Java程序中,main方法的格式正确的是()。A.static void main (string[] args)B.public void main (string[] s)C.public static main (string[] args)D.public static void main (string[] args)

【单选题】下面哪些语句能够正确地生成5个空字符串?()A.String[] a=new String[5];B.String a[5];C.String a[]={"","","","",""};D.String[5] a;

下面定义ArrayList语句正确吗? ArrayList <String> names= new ArrayList <String>;

给定如下Java代码,编译运行的结果是() public class Test { public static void main(String[] args) { Map<String, String> map = new HashMap<String, String>(); String s = "code"; map.put(s, "1"); map.put(s, "2"); System.out.println(map.size()); } }A.编译时发生错误B.运行时引发异常C.正确运行,输出:1D.正确运行,输出:2