论坛
提问
用户
提问
×
游客
登录
注册
忘记密码?
没有声明为public、private或protected的变量被称为什么?
论坛
没有声明为public、private或protected的变量被称为什么?
9 浏览
2023年5月6日
匿名的
2023年5月6日
0
Comments
没有声明为public、private或protected的变量被称为什么?
如果不是这样定义:
private JButton theButton;
而是像这样定义一个字段:
JButton theButton;
有什么区别吗?
0
0
答案
活跃
已投票
最新
最老的
用户名或电子邮箱地址
密码
注册
Lost Password
Java受保护的字段 vs 公共的getter方法
`public class` 和 `class` 之间有什么区别?
为什么我们在拥有访问器和修改器的情况下要声明私有字段?
在Java中,public、protected、package-private和private有什么区别?
Java字段隐藏
为什么要明确地写上“private”?
变量初始化,有什么区别?
我应该使用公共属性和私有字段还是公共字段来存储数据?
为什么Java内部类需要"final"外部实例变量?
说实话,公共变量和公共属性访问器有什么区别?
在声明变量时的区别
'public static final' or 'private static final' with getter? 使用getter方法时,应该使用'public static final'还是'private static final'?
在C#中,public,private,protected和没有访问修饰符之间有什么区别?
属性与公共成员变量
在Java中,getter和setter的用途是什么?
如何在Java中声明一个常量?
为什么Java中的属性可以是public的?
如何在子类中使用私有变量?
通过使用公共变量来提高性能?
为什么不是所有的方法和类变量都可以是静态的?