下列哪项是String的字面量?()
第1题:
定义—个长度为5值为空的字符串数组,下列选项不正确的是
A.String a[]={"","","","","",""};
B.String a[5];
C.String[5]a;
D.String[] a new String[5]; for(int i=0;i<5;a[i++]-null);
第2题:
下列语句能给数组赋值而不使用for循环的是
A.myArray{[1]="One";[2]="Two";[3]="Three";}
B.String s[5]=new String[]{"Zero", "One", "Two", "There", "Four"};
C.String s[]=new String[]{"Zero", "One", "Two", "There", "Four"};
D.String s[]=new String[]=|"Zero", "One", "Two", "There", "Four"};
第3题:
下列哪个语句是声明一个含有10个String对象的数组( )?
A.char str[];
B.char str[][];
C.String str[]=new String[10];
D.String str[10];
第4题:
下列#include命令中,正确的是()
第5题:
A.#inclue[string.h]
B.#include{string.h}
C.#include(string.h)
D.#include
第6题:
下列的哪个程序段可能导致错误? ( )
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";
第7题:
下列字符串中非法字符串为( )。
A.’a string’
B.’It is a’string’.’
C.”a string”
D.”It is a’string”
第8题:
定义一个长度为5值为空的字符串数组,下列选项不正确的是
A.String a[]={"","","","",""};
B.String a[5];
C.String [5]a;
D.String[]a=new String[5]; for(int i=0;i<5;a[i++]=null);
第9题:
下列的哪个程序段可能导致错误?
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";
第10题:
下列选项哪些是正确的JSP表达式语法格式()。