访问说明符和访问修饰符之间有什么区别? [英] What is the difference between access specifiers and access modifiers?
问题描述
在Java中,访问说明符和访问修饰符是一回事吗?
In Java, are access specifiers and access modifiers the same thing?
推荐答案
不。 访问修饰符是 private
, protected
和 public $ c的官方术语$ c>,而在 Java语言规范并且AFAIK不是广泛使用的东西。
No. "access modifier" is the official term for private
, protected
and public
, whereas the term "access specifier" does not occur at all in the Java language specification and is AFAIK not something that is widely used.
访问修饰符是的官方术语,
protected
和 public
java.sun.com/docs/books/jls/third_edition/html/j3TOC.html\"rel =noreferrer> Java语言规范。 访问说明符在 Java API doc ,但这是我第一次注意到这一点。坚持使用JLS术语可能更好。
"access modifier" is the official term for private
, protected
and public
used in the Java language specification. "access specifier" is used synonymously in the Java API doc, but this is the first time I've noticed that. It's probably better to stick with the JLS term.
这篇关于访问说明符和访问修饰符之间有什么区别?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!