Java中,未带访问权限修饰符的成员变量默认为( )。
2023-09-01
B.Private
C.Protected
D.Friendly
参考答案:D
本题考查Java中成员变量的类型。在Java中,类中所定义的数据或者变量叫做实例变量或成员变量,它提供了一组访问修饰来限制对成员变量和成员函数的访问权限,包括:Public公有类型的成员可以被所有类访问。Private私有类型的成员只能被这个类本身所访问。Protected保护类型的成员只能被这个类本身,它的子类以及同一个包中所有的其他类访问。Friendly友元类型的成员可以被这个类本身和同一个包中的所有类访问。如果成员变量不加任何修饰符,则默认为Friendly类型。
![]( //img1.runjiapp.com/duoteimg/tiku/images/pc/questionBank/main-list-title-icon.png)
![](https://img1.runjiapp.com/duoteimg/tiku/banner/bn_67.jpg)
![](https://img1.runjiapp.com/duoteimg/tiku/banner/bn_98.jpg)
![](https://img1.runjiapp.com/duoteimg/tiku/banner/bn_95.jpg)
![](https://img1.runjiapp.com/duoteimg/tiku/banner/bn_77.jpg)
2023-06-03
从业资格其它
![](https://img1.runjiapp.com/duoteimg/tiku/banner/bn_52.jpg)
![](https://img1.runjiapp.com/duoteimg/tiku/banner/bn_64.jpg)
社会工作者要对服务对象的处境和状况进行评估,其所运用的知识属于( )。
2023-06-03
从业资格其它
![](https://img1.runjiapp.com/duoteimg/tiku/banner/bn_97.jpg)
2023-06-03
从业资格其它
![](https://img1.runjiapp.com/duoteimg/tiku/banner/bn_96.jpg)
2023-06-03
从业资格其它
热门标签