Home >Java >javaTutorial >Regaining the basics of Java (5): Relevant knowledge description
Regain the basics of java (5): Relevant knowledge description
Note: What keywords cannot the abstract keyword coexist with?
Final: If the method is abstracted, it needs to be rewritten, but final cannot be rewritten, so there is a conflict.
Private: If a method is private and subclasses cannot inherit it, how can it be rewritten?
static: No object is needed. Abstract methods can be called through the class name, but calling abstract methods is meaningless.
*** When compiling polypeptides, you should pay attention to the parent class when compiling, and the subclass when running. , for example, when calling a method in a subclass when compiling, it means to see if the parent class has