Implementation interface of java basic tutorial
•
Java
In the encapsulation and interface, the private keyword encapsulates the internal members of the object. After encapsulation, the product hides the internal details and is only provided to the user interface.
Note the second point: the method in the interface defaults to public. As we mentioned in encapsulation and interface, the public method of a class constitutes the interface. Therefore, all methods appearing in the interface are public by default.
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
二维码