【单选题】【消耗次数: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);
随机题目
【多选题】 因产品存在缺陷造成人身或该缺陷产品以外的其他财产损害的在下列哪些情况下生产者不承担赔偿责任?( )
①  产品的修理者对其进行改装前没有缺陷的
②  事故是由于外购件存在的缺陷引起的
③  产品是按国家标准组织生产并达到标准要求的
④  产品投入流通时的科技水平尚不能发现缺陷存在的
⑤  事故是在“三包”期满后发生的
【多选题】 下列产品中应有警示标志或中文警示说明的有( )?
①  有副作用的药品
②  需稀释方可使用的农药
③  易燃易爆物
④  婴儿用奶粉
⑤  书籍
【判断题】 会计法律制度是会计职业道德的最低要求( )
①  正确
②  错误
【多选题】 贾小姐可通过下列哪些途径解决自己在购物时与超市发生的争议?( )
①  与经营者协商调解
②  请求消费者协会调解
③  向有关行政部门申诉
④  向人民法院起诉
⑤  向公安机关举报
【单选题】 以下对二维数组a的正确说明是( )。
①  int a[3][];
②  float a(3,4)
③  double a[1][4];
④  float a(3)(4);
【单选题】 已知定形尺寸和定位尺寸的线段叫______
①  已知线段
②  中间线段
③  连接线段
【单选题】 按复合按扭时,( )。
①  常开先闭合
②  常闭先断开
③  常开、常闭同时动作
④  常闭动作,常开不动作
【单选题】 热继电器在电动机控制线路中不能作( )。
①  短路保护
②  过载保护
③  缺相保护
④  电流不平衡运行保护
【判断题】 所谓变造会计凭证、会计账簿及其他会计资料,是指以虚假的事项为前提编造不真实的会计凭证、会计账簿及其他会计资料。( )
①  正确
②  错误
【单选题】 A单位会计王某采用涂改手段,将金额为10000元的购货发票改为40000元。根据《会计法》有关规定,该行为属于( )。
①  伪造会计凭证
②  变造会计凭证
③  伪造会计账簿
④  变造会计账簿