Note in Java development

xiaoxiao2021-03-06  104

1. Private variables and methods cannot be accessed by this class, and cannot be inherited. However, the private variable can be assigned and accessed by setting the GET, SET method.

2. Final is used to modify the value that cannot be changed.

Final class does not have a subclass, which is automatically finafter

Final method cannot be overloaded by any subclass, can speed up the execution speed

Final variables can not be changed, usually called constants

转载请注明原文地址:https://www.9cbs.com/read-104287.html

New Post(0)