单选题下列哪项是String的字面量?()A“Hello”B‘world’C/u2345Dnew String(“good”)
单选题
下列哪项是String的字面量?()
A
“Hello”
B
‘world’
C
/u2345
D
new String(“good”)
参考解析
解析:
暂无解析
相关考题:
下列哪个语句是声明一个含有10个String对象的数组( )?A.char str[];B.char str[][];C.String str[]=new String[10];D.String str[10];
定义一个长度为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);
定义—个长度为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);
下列的哪个程序段可能导致错误? ( )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";
下列语句能给数组赋值而不使用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"};
下列的哪个程序段可能导致错误?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";
下列选项哪些是正确的JSP表达式语法格式()。A、%string name="YXQ"%=string name="您好"%String name="YXQ"% B、%=String name="您好"% C、%="您好";% D、%="YXQ"%
下列类Account的构造方法中,声明正确的是?() A、Account (String name)()B、Account (String name)C、Account (name)()D、NewAccount (String name)()
public class Employee{ private String name; public Employee(String name){ this.name = name; } public String getName(){ return name; } } public class Manager extends Employee{ public Manager(String name){ System.out.println(getName()); } } 执行语句new Manager(“smith”)后程序的输出是哪项?() A、 smithB、 nullC、 编译错误D、 name
下列不是 String 类的方法的是()A、charAt(int index)B、indexOf(String s)C、beginWith(String s)D、endsWith(String s)
下面哪项不是response对象的方法()A、set Content Type(String contentTypestr)B、set Header(String headername,String headervalue)C、get Parameter(String str)D、send Error(int errorcode)
main方法是Java程序执行的入口点,关于main方法的方法头以下哪项是合法的()?A、public static void main( )B、public static void main( String args[] )C、public static int main(String [] arg )D、public void main(String arg[] )
单选题下列类Account的构造方法中,声明正确的是?()AAccount (String name)()BAccount (String name)CAccount (name)()DNewAccount (String name)()
单选题public class Employee{ private String name; public Employee(String name){ this.name = name; } public String getName(){ return name; } } public class Manager extends Employee{ private String department; public Manager(String name,String department){ this.department = department; super(name); System.out.println(getName()); } } 执行语句new Manager(“smith”,”SALES”)后程序的输出是哪项?()A smithB nullC SALESD 编译错误
单选题下列选项哪些是正确的JSP表达式语法格式()。A%string name="YXQ"%=string name="您好"%String name=YXQ% B%=String name=您好% C%=您好;% D%=YXQ%
单选题在VB语言中,下列定义变量语句格式正确的是()。ADim As String xuehaoBDim xuehao As StringCDim String As xuehaoDConst xuehao As String
单选题public class Employee{ private String name; public Employee(String name){ this.name = name; } public String getName(){ return name; } } public class Manager extends Employee{ public Manager(String name){ System.out.println(getName()); } } 执行语句new Manager(“smith”)后程序的输出是哪项?()A smithB nullC 编译错误D name
单选题下列不是 String 类的方法的是()AcharAt(int index)BindexOf(String s)CbeginWith(String s)DendsWith(String s)
单选题下面哪项不是response对象的方法()Aset Content Type(String contentTypestr)Bset Header(String headername,String headervalue)Cget Parameter(String str)Dsend Error(int errorcode)