给出如下声明:String s1=new String(“Hello”);String s2=new String(“there”);String s3=new
A.s3=s1+s2
B.s3=s1-s2
C.s3=s1&s2
D.s3=s1&&s2
A.s3=s1+s2
B.s3=s1-s2
C.s3=s1&s2
D.s3=s1&&s2
第1题
给定程序如下
public static void main(String args[]) {
Float f=new Float(4.2f);
Float c;
Double d=new Double(4.2);
float fl=4.2f;
c=f;
}
下列选项中()的值为真。
A、f.equals(d)
B、c=f
C、c==d
D、c.equals(f)
第2题
A.s.equals(t);
B.t.equals(c);
C.s==t;
D.t.equals(new String("hello"));
第3题
给定某Java程序的main方法,如下:
publicstaticvoidmain(String[]args){
System.out.print(“Hello”+args[1])
}
从命令行传参:peopleworldnation,该程序的运行结果是()。
A.Hellopeople
B.Helloworld
C.Hellopeopleworldnation
D.运行时出现异常
第4题
import java.io.*;
public class Test {
public static void main(String args[]) {
try {
String s = "ABCDE" byte b[]=s.getBytes()
FileOutputStream file =
new FileOutputStream("test.txt", true)
file.write(b) file.close() }
catch(IOException e) {
System.out.println(e.toString()) }
}
}
A、ABCABC
B、ABCDE
C、Test
D、ABCDEABCDEABCDE
第5题
A.int [][]a = new int[10][];
B. int a[10][10] = new int[][];
C. int []a[] = new int[10][10];
D. int a[][] = new int[10][10]
第6题
A.正确运行,输出:A
B.编译时发生错误
C.正确运行,输出:B
D.运行时引发异常
第7题
写出用广义表表示法表示的树的类声明,并给出如下成员函数的实现:
(1)operator>>()接收用广义表表示的树作为输人,建立广义表的存储表示;
(2)复制构造函数用另一棵表示为广义表的树初始化棵树;
(3)operator==()测试用广义表表示的两棵树是否相等
(4)operator<<()用广义表的形式输出一棵树;
(5)析构函数清除一棵用广义表表示的树。
第8题
A.a
B.b
C.c
D.d
第9题
A.XB::XB(inta,intb):x(a),y(b){}
B.XB::XB(inta,intb):XA(a),y(b){}
C.XB::XB(inta,intb):x(a),XB(b){}
D.XB::XB(inta,intb):XA(a),XB(b){}
第10题
假设工资率是16美元/小时,产品价格是2美元。每小时产出和劳动投入的关系如下:
(1)找到利润最大化时的劳动数量。
(2)假设产品价格保持2美元不变,但工资率上升到21美元。找到新的利润最大化的劳动数量。
(3)假设产品价格增加到3美元而工资保持在16美元。找到新的利润最大化的劳动数量。
(4)假设产品价格2美元和工资率16美元保持不变,但是技术进步导致任何劳动投入水平下的产出都增加25%。找到新的利润最大化的劳动数量。
Suppose that the wage rate is $ 16 per hour and the price of the products $ 2. Values for output and labor are in units per hour.
a. Find the profit - maximizing quantity of labor.
b. Suppose that the price of the product remains at S2 but that the wage rate increases to $21. Find the new profit - maximizing level of 1
c. Suppose that the price of the product increases to $3 and the wage remains at S 16 per hour. Find the new profit - maximizing L.
d. Suppose that the price of the product remains at $2 and the wage at $ 16, but that there is a technological breakthrough that increases output by 25 percent for any given level of labor. Find the new profit - maximizing L