What is the difference between the lack of an access specifier and the public in the java 9 module?

From java 9, open access is limited to its own module. Does this mean that it publicacts like package protected(without an access specifier)? Can anyone clarify this?

+4
source share
2 answers

One of the main objectives of the System Module is to provide:

Strong encapsulation to allow a component to declare which of its public types is available to other components, and which are not.

To add #accessibility to it -

Java , , ,

, export , .

(, ) .

, ( )?

, , () , .

+5

package . .

public exports .

:

  • package package-local
  • public exports -.

, public exports package.

+3

Source: https://habr.com/ru/post/1689297/


All Articles