【单选题】【消耗次数:1】
声明成员变量时,如果不使用任何访问控制符(public, protected, private),则以下哪种类型的类不能对该成员进行直接访问 ( )
同一类
同一包中的子类
同一包中的非子类
不同包中的子类
参考答案:
复制
纠错
相关题目
【单选题】 关于被私有访问控制符private修饰的成员变量,以下说法正确的是( )
①  可以被三种类所引用:该类自身、与它在同一个包中的其他类、在其他包中的该类的子类
②  可以被两种类访问和引用:该类本身、该类的所有子类
③  只能被该类自身所访问和修改
④  只能被同一个包中的类访问
【单选题】 在哪种派生方式中,派生类可以访问基类中的protected成员( )
①  public和private
②  public和protected
③  protected和private
④  仅protected
【单选题】 在哪种派生方式中,派生类可以访问基类中的protected成员( )
①  public和private
②  public和protected
③  protected和private
④  仅protected
【单选题】 不允许作为类及类成员的访问控制符的是( )。
①  public
②  private
③  static
④  protected
【判断题】 子类的成员变量和成员方法的数目一定大于等于父类的成员变量和成员方法的数目。
①  正确
②  错误
【判断题】 4.使用Thread子类创建线程的优点是可以在子类中增加新的成员变量,使线程具有某种属性,也可以在子类中新增加方法,使线程具有某种功能。但是,Java不支持多继承,Thread类的子类不能再扩展其他的类。( )
①  正确
②  错误
【单选题】 下列哪种类成员修饰符修饰的变量只能在本类中被访问?( )
①  protected
②  public
③  default
④  private
【单选题】 类中定义的成员默认为()访问属性。
①  public
②  private
③  protected
④  friend
【多选题】 功勋科学家 孙家栋多个第一包括().
①  A.中国第一枚导弹技术负责人
②  B.第一颗遥感探测卫星技术负责人
③  C.第一颗人造地球卫星技术负责人
④  D.第一颗返回式卫星的技术负责人
【单选题】 下列选项中,用于在定义子类时声明父类名的关键字是()。
①  interface
②  package
③  extends
④  class
随机题目
【单选题】 19. He tried to _____ from his memory what he knew of his former neighbor..
①  think of
②  remember
③  summon
④  gave way
【单选题】 14. Mary is _______ to what others think of her.
①  sensitive
②  sensational
③  sensory
④  sensible
【单选题】 11 ______, they had no chance of winning.
①  brave as they fought
②  bravely as they fought
③  If they fought bravely
④  Since they fought bravely
【单选题】 15. She suffered great mental_____ after her husband died, and as a result she became mad.
①  anger
②  . discomfort
③  unhappiness
④  anguish
【单选题】 18. Strong feelings _____ within him.
①  opened
②  . welled up
③  rose up
④  confronted
【单选题】 13. The supervisor appreciates ______ so hard in the office.
①  for your working
②  your working
③  you to work
④  for you to work
【单选题】 10. ______, he was unable to make much progress.
①  Hard as he tried
②  Though hard as he tried
③  He tried hard
④  Because he tried hard
【单选题】 6. She felt herself ______ by the wind.
①  lift
②  lifting
③  has been lifted
④  lifted
【单选题】 9.She does not_____ that she owes the money, but she just wouldn’t like to return it.
①  argue
②  . dispute
③  think
④  agree
【单选题】 9. By 2008, Beijing ______ its total discharge of pollutants.
①  will reduce
②  will have reduced
③  reduces
④  has reduced