Question

What is the difference between access specifiers and access modifiers?

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

 45  69412  45
1 Jan 1970

Solution

 48

"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.

2010-02-10

Solution

 7

The term Access specifier used by c++ programmers not in java. In java Officially we use Access Modifier.

For example: when we declare a class with private, static the compiler clearly shows the error message as follows:
enter image description here

2016-01-09