下列符合Method说法正确是()。
第1题:
A、(1)和(2)删掉一个,错误解决
B、(3)删掉,错误解决
C、没问题
第2题:
类Test定义如下,将下列______方法插入③行处是不合法的。 ( )①public class Test{②public float Method(float a,float b){}③④}
A.public float Method(float a,float b,float c){}
B.public float Method(float c,float d){}
C.public int Method(int a,int b){}
D.private float Method(int a,int b,int c){}
第3题:
A、润滑可以控制磨擦
B、润滑可以减少磨损
C、润滑不具有节能作用
D、润滑是节省原材料的有效措施
第4题:
给出下列的不完整的方法,则哪个声明可以被加入①行完成此方法的声明?( ) ① ② {success=connect(); ③ if(success==-1){ ④ throw new TimedOutException(); ⑤ } ⑥ }
A.public void method()
B.public void method()throws Exception
C.public void method()throw TimedOutException
D.public throw TimedOutException void method()
第5题:
给出下列的不完整的方法,则下列的哪个声明可以被加入①行完成此方法的声明? ① ② { success = connect( ); ③ if (success = = - 1 ) { ④ throw new TimedoutException( ) ⑤ } ⑥ }
A.public void method( )
B.public void method( ) throws Exception
C.public void method( ) throw TimedoutException
D.public throw TimedOutException void method( )
第6题:
接口A的定义如下,指出下列哪些类实现了该接口______。 Interface A { Int method1 (int i); Int method2 (int j); }
A.class B implements A { Int method1(){} Int method2(){} }
B.class B extends A { Int method1(int i){} Int method2(int j){} }
C.class B { Int method1(int i){} Int method2(int j){} }
D.class B implements A { Int method1(int i){} Int method2(int j){} }
第7题:
给出下列的不完整的方法,则下列的( )声明可以被加入①行完成此方法的声明。 ① ②{success=connect(); ③if(success==-1){ ④throw new TimedOutException(); ⑤} ⑥}
A.public void method()
B.public void method()throws Exception
C.public void method()throw TimedOutException
D.publicthrowTimedOutExceptionvoidmethod()
第8题:
method condensed preparation method
第9题:
类Test定义如下,将下列( )方法插入③行处是不合法的。 ①publicClass Test{ ②public float Method(floatA,float b){} ③ ④}
A.public float Method(floatA,float b,floatC){}
B.public float Method(noatC,float d) {}
C.public int Method(intA,int b){}
D.private float Method(intA,int b,intC){}
第10题:
有一个接口定义如下,下列选项中实现了该接口并且不是抽象的是( )。interface A{ int method1 (int i); int method2 (int j);}
A.class B implements A{ int method1() { } int method2() { }}
B.class B{int method1(int i) { }int method2(int j) { }}
C.class B implements A{ int methodl(int i) { } int method2(intj) { }}
D.class B extends A{int method1(int i) { }int method2(int j) { }}