答案查看网,轻松搜题/搜资源
登录
×
登录账号
记住密码
立即注册
忘记密码
×
注册
使用微信扫描二维码,获取账号密码后免费查看答案
前往登录
忘记密码
×
忘记密码
使用微信扫描下方二维码,即可找回您的账号密码
前往登录
立即注册
搜题/搜资源
【单选题】【消耗次数: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
查看完整题目与答案