【单选题】【消耗次数:1】
下面哪个函数是public void method(){ }的重载函数?( )
public void method( int m){ }
public int method(){ }
public void method2(){ }
public int method(int m,float f ){ }
参考答案:
复制
纠错
相关题目
【单选题】 运行下面程序时,会产生什么异常?( ) public class X7_1_4 { public static void main(String[] args) { int x = 0; int y = 5/x; int[] z = { 1,2,3,4 } ; int p = z[4]; } }
①  ArithmeticException
②  NumberFormatException
③  ArrayIndexOutOfBoundsException
④  IOException
【单选题】 运行下面程序时,会产生什么异常?( ) public class X7_1_5 { public static void main(String[] args) { int[] z = { 1,2,3,4 } ; int p = z[4]; int x = 0; int y = 5/x; } }
①  ArithmeticException
②  NumberFormatException
③  ArrayIndexOutOfBoundsException
④  IOException
【单选题】 给出下面代码段, 哪行将引起一个编译时错误?( ) 1) public class Test { 2) int n = 0; 3) int m = 0; 4) public Test(int a) { m=a; } 5) public static void main(String arg[]) { 6) Test t1,t2; 7) int j,k; 8) j=3; k=5; 9) t1=new Test(); 10) t2=new Test(k); 11) } 12) }
①  行1
②  行4
③  行6
④  行9
【单选题】 以下程序的运行结果是:( ) public class Increment{ public static void main(String args[]){ int c; c = 2; System.out.println(@@; System.out.println(c++); System.out.println(@@; } }
①  2 2 2
②  2 3 3
③  2 2 3
④  3 4 4
【单选题】 已知有下面类的说明: public class X5_1_1 extends x{ private float f =10.6f; int i=16; static int si=10; public static void main(String[] args) { X5_1_1 x=new } } X5_1_1(); 在 main()方法中,下面哪条语句的用法是正确的?( )
①  x.f
②  this.si
③  X5_1_1.i
④  X5_1_1.f
【单选题】 编译运行以下程序后,关于输出结果的说明正确的是 ( ) public class Conditional{ public static void main(String args[ ]){ int x=4; System.out.println(“value is “+ ((x>4) ? 9.9:9)); } }
①  输出结果为:value is 99.9
②  输出结果为:value is 9
③  输出结果为:value is 9.0
④  编译错误
【单选题】 编译下面源程序会得到哪些文件( )? class A1{ } class A2{ } public class B{ public static void main(String[] args) { } }
①  只有B.class 文件
②  只有 A1.class 和 A2.class 文件
③  编译不成功
④  A1.class、A2.class 和B.class 文件
【单选题】 下列程序的运行结果是( ) 。 public class X5_1_2 extends x{ int ab() { static int aa=10; aa++; System.out.println(aa); } public static void main(String[] args) { X5_1_2 x=new X5_1_2(); x.ab(); } }
①  10
②  11
③  编译错误
④  运行成功,但不输出
【单选题】 Which of the following is not grammar presentation method?
①  Deductive method
②  Inductive method
③  Guided discovery method
④  Communicative teaching method.
【单选题】 int Func(int,int);不可与下列哪个函数构成重载( )
①  int Func(int,int,int);
②  double Func(int,int);
③  double Func(double,double);
④  double Func(int,double);
随机题目
【多选题】 在我国《海商法》上,下列海事请求权中,属于限制性债权的包括()。
①  因迟延交付货物造成的损失
②  船舶对于航道的助航设施的损害
③  共同海损分摊
④  海上油污损害赔偿
⑤  与船舶营运直接相关的人身伤亡
【多选题】 根据我国《海商法》的规定,在以下所列各项保险标的损失情况中,属于推定全损的是()。
①  货物全部毁灭
②  船舶损失严重,实际全损已经不可避免
③  大部分货物毁灭
④  为避免船舶沉没所支出的救助费用超过船舶价值
⑤  船舶沉没
【单选题】 基于船舶在海上的流动性特点,在未经保险人同意的情况下,船东转让船舶所有权给第三人时,相关的船舶保险合同()。
①  继续有效
②  效力解除  
③  自始无效
④  构成违约
【单选题】 如果船舶租用合同的条款与我国《海商法》的条文相矛盾时,应当()。
①  适用合同条款
②  适用法律条文
③  两者同时适用
④  两者均不适用
【单选题】 在我国《海商法》上,海难救助的救助对象不包括()。
①  船舶
②  水下输油管道
③  船舶属具
④  船载货物
【单选题】 下列各项中,属于海事法律关系客体的是()。
①  自有房屋
②  空运货物
③  铁路运输行为
④  承租船舶
【单选题】 海上保险合同的被保险人在保险人向其履行了保险责任之后,其所享有的向致其保险财产损坏的第三人追偿的权利,应当()。
①  转让给保险人
②  随之全部消灭  
③  本人另行行使
④  随之部分消灭
【单选题】 根据海商法的海上油污损害赔偿责任制度理论,下列各项中,不属于海上油污损害赔偿责任构成条件的是()。
①  存在海上排污行为
②  存在海上油污损害后果  
③  海上排污行为与损害后果间存在因果关系
④  不存在免责事由
【单选题】 保险委付适用的场合是保险标的()。
①  部分损失
②  实际全损
③  共同海损
④  推定全损
【单选题】 我国《海商法》规定的承运人对于非集装箱装运的货物的责任期间是()。
①  从货物装上船时起至卸下船时止
②  从装货港接收货物时起至卸货港交付货物时止
③  从装货港仓库至卸货港仓库
④  从发货人的工厂仓库至收货人的仓库