整专业资料
微信QQ群
考生网QQ群

群号:517231281

扫码加群
点击二维码加群

考生网微信公众号

微信号:zikaosw

课程试听
最新资讯

手机端访问

1、直接输入www.zikaosw.cn
2、扫描左侧二维码

登录 | 注册
登录/注册后,可享受
  • 课程免费试听
  • 试做在线题库
  • 学习提升指导
  • [单选题] 关于构造函数的说法哪个正确?( ).

    • A、一个类只能有一个构造函数
    • B、一个类可以有多个不同名的构造函数
    • C、构造函数与类同名
    • D、构造函数必须自己定义,不能使用父类的构造函数

     纠错    

  • 助考班推荐

您可能感兴趣的试题

  • 1、[单选题]类Test1定义如下:1.public class Test1{2. public float aMethod(float a,float b){ }3.4.}将以下哪种方法插入行3是不合法的.( )

    • A、public float aMethod(float a, float b,float c){ }
    • B、public float aMethod(float c,float d){ }
    • C、public int aMethod(int a, int b){ }
    • D、private float aMethod(int a,int b,int c){ }
  • 2、[单选题]以下由 for 语句for ( int i = 0; true ; i++) ;构成的循环执行的次数是( ).

    • A、有语法错,不能执行
    • B、无限次
    • C、执行1次
    • D、一次也不执行
  • 3、[单选题]关于构造函数的说法哪个正确?( ).

    • A、一个类只能有一个构造函数
    • B、一个类可以有多个不同名的构造函数
    • C、构造函数与类同名
    • D、构造函数必须自己定义,不能使用父类的构造函数
  • 4、[单选题]如果有一个对象myListener(其中myListener对象实现了ActionListener接口),下列哪条语句使得myListener对象能够接受处理来自于smallButton按钮对象的动作事件?

    • A、smallButton.add(myListener);
    • B、smallButton.addListener(myListener);
    • C、smallButton.addActionListener(myListener);
    • D、smallButton.addItem(myListener);
  • 5、[单选题]下列类定义中,不正确的是( ).

    • A、class x { .... }
    • B、class x extends y { .... }
    • C、static class x implements y1,y2 { .... }
    • D、public class x extends Applet { .... }

Copyright © 2010 - 2023 湖南求实创新教育科技有限公司 All Right Reserved.

温馨提示:如您需要的资料本网暂时没有,请于工作日08:00-18:00,点击这里,联系客服及时补充资料。