求类似不可抗力:wiie帮帮我做做这几道题吧~~很急!!等这救命的!!

来源:百度文库 编辑:杭州交通信息网 时间:2024/04/28 21:22:10
44. 类Test1定义如下:
1.public class Test1{public float aMethod(float a,float b){ }}
将以下哪种方法插入行3是不合法的。( )
A、 public float aMethod(float a, float b,float c){ }
B、 public int aMethod(float c,float d){ }
C、 public int aMethod(int a, int b){ } D、 private float aMethod(int a,int b,int c){ }
45. 类Test1、Test2定义如下:
1. public class Test1
2.{ public float aMethod(float a,float b) throws
3. Exception { }4. }
5. public class Test2 extends Test1{}
将以下哪种方法插入行6是合法的。(选两个)
A、 protected float aMethod(float a,float b){ }
B、 public int aMethod(int a,int b)throws Exception{ }
C、 public float aMethod(float p,float q){ }
D、 public int aMethod(int a,int b)throws IOException{ }
53. 给定下面的源代码,则输出结果是:
class TestStaticCode
{ static{ System.out.println("TestStaticCode is loading"); }
TestStaticCode(){System.out.println("Call Custructor 1 ");}
TestStaticCode(int a){System.out.println("Call Custructor 2 ");}
public static void main(String [] args)
{ new TestStaticCode ();
new TestStaticCode (2);}}
A、 TestStaticCode is loading
Call Custructor 1
TestStaticCode is loading
Call Custructor 2
B、TestStaticCode is loading
Call Custructor 1
Call Custructor 2
C、TestStaticCode is loading
D、 Call Custructor 1
Call Custructor 2
E、Call Custructor 1
Call Custructor 1
54. 你想让任意包中的子类都可以访问其父类中的成员,对于父类下面哪一个修饰限定符可以恰好满足这一要求?
A. public B.private C.protected D.transient E. No access modifier is qualified
55. 给定下面的代码,编译运行结果将是:
public class TestVar
{public static void main(String [] args)
{ int x;
x=x+1;
System.out.println("x is "+x);}}
A、x is 1 B、x is +1C、x is (某个不能确定的数值) D、编译失败
56. 在AWT中不是容器的部件是:
A、 ScrollPanel B、Dialog C、TextArea、D、Applet
57. 选择输出结果?
public class Test{
public static void main(String args[]){
String s=new String(”true”);
Boolean b=new Boolean(true);
if(s.equals(b))
{ System.out.println(“hello”);} } }
A.print “hello” B.compile error at line 6
C.compile succeed but print nothing
不定项选择题()
58. 编译并运行以下程序(命令:java AB 1),关于运行结果的描述以下哪个选项是正确的( )
class AB{
public static void main(String [ ] args){
int i=0;
try{i=Integer.parseInt(args[0]);}catch(Exception e){ }switch(i)
{case 0: System.out.println("0");case 1: System.out.println("1");
default : System.out.println("default"); }}}
A、 编译出错 B、打印出“0” C、打印出“1” D、打印出“default”

44a 45c 53b 54b 55b 56c 57a 58b
记着给我加分

己经有人帮你做了~~~:)