访问说明符和访问修饰符之间有什么区别? [英] What is the difference between access specifiers and access modifiers?

查看:129
本文介绍了访问说明符和访问修饰符之间有什么区别?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在Java中,访问说明符访问修饰符是一回事吗?

In Java, are access specifiers and access modifiers the same thing?

推荐答案

不。 访问修饰符是 private protected public ,而在 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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆