Keywords of the method cannot be modified together with abstruct, which is the abstruct keyword.
Abstract class: at least one dynamic method is an abstract method.
Which of the following keywords cannot be modified together with the abstruct keyword modifier?
1 private
Because the private modifier is hidden and invisible in the subclass. The abstruct modifier method is abstract and needs to implement the method body in the subclass. Therefore, they conflict with each other and cannot be used together.
2 static
Static indicates that this method is a class method, and there is only one copy in the memory, while abstruct indicates a dynamic method and is bound to the object. So there is a conflict and it is not feasible.
3 final
The final method indicates an immutable method, that is, a method that cannot be modified in the subclass. It is inconsistent with the implementation in the subclass represented by abstruct, so the same method cannot be modified together.
Knowledge points in Interfaces
Interface function:
1 program decoupling
2. Define Constraints
3. Extended Functions
Attention details
1. variables defined in the interface. The default modifier is public, final, and abstruct.
2. The default modifier is public and abstruct.
3. The interface cannot create objects.
4. No constructor IN THE INTERFACE
5. All methods in the interface should be implemented when non-abstract classes are implemented.