void f(){ }
string f(){ }
void f(string a){ }
string f(string a){ }
第1题:
设有语句组:
Dim S1 As String*5
S1 = "VB Test"
则S1的值为( )。
A、 VB Test
B、 VB Te
C、 VBTes
D、 BTest
第2题:
下列语句输出结果为( )。 public class test\ { public static void main (String args[]) { String s1=new String("How"); String s2=new String("How"); System.out.println(!(s1.equals(s2))); } }
A.false
B.true
C.0
D.1
第3题:
A.s.append(“x”);
B.s.concat(“y”);
C.s.substring(3);
D.以上语句都不会
第4题:
下列语句输出结果为( )。 public class test { public static void main(String args[]) String s1 =newString("HOW"); String s2=newString("How"): System.out.pnntln(!(s1.equals(s2))); } }
A.假
B.真
C.0
D.1
第5题:
为了从HTML文件中获取参数,在Applet程序中应该编写的代码是 ( )
A.在start()方法中加入语句String s=getParameter("buttonLabel");
B.在init()方法中加入语句String s=Parameter("buttonLabel");
C.在init()方法中加入语句String s=getParameter("BUTTONLABEL");
D.在start()方法中加入语句String s=getParameter("BUTTONLABEL");
第6题:
假定程序中有以下语句: answer=MsgBox("Stringl",,"String2","String3",2) 执行该语句后,将显示一个信息框,此时如果单击“确定”按钮,则answer的值为: ______。
A.String1
B.String2
C.String3
D.1
第7题:
下面程序执行后,输出结果为:true请在程序的每条横线处填写一个语句,使程序的功能完整。
注意:请勿改动main()主方法和其他已有的语句内容,仅在横线处填入适当的语句。
public class TestStringCompare{
{public static void main(String ____________________ args)
{char charl[]={'t','e','s','t'};
char char2[]={'t','e','s','t','1'};
String str1=new String(___________________);
String str2=new String(char2,0,4);
System.out.println(__________________________);
}
}
第8题:
假定程序中有以下语句: answer=MsgBox("String1",,"String2","String3",2) 执行该语句后,将显示一个信息框,此时如果单击“确定”按钮,则answer的值为 ______。
A.String1
B.String2
C.String3
D.1
第9题:
在某类的公共部分有声明string operator++( );和string operator++(int);则说明
A.string operator++( );是前置自增运算符声明
B.string( )perator++( );是后置自增运算符声明
C.string operator++(int);是前置自增运算符声明
D.两条语句无区别
第10题:
下列语句输出结果为( )。 public class test { public static void main(StringArgsl[]) { String s1=new String("How"); String s2=new String("How"); System.out.println(!(s1==s2)); } }
A.false
B.true
C.1
D.0