Java access rights
•
Java
public
Classes in the same package or in different packages can be accessed freely
private
Can only be used in this class
Default (do not write permission modifier, that is, default permission)
Free access in the same package
Package import
When using classes in other packages, you no longer need to use the full name
Import a single class
The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
二维码