Home >Java >javaTutorial >Does the Java keyword contain 'default'?
Answer: default is a keyword in java8, also called "virtual extension method s”.
The Chinese translation is called "Virtual Extension Method", which contains some default usage methods in the interface.
When the interface is extended, will not conflict with the implementation class code related to the interface .
1. The previous interface was a double-edged sword, capable of abstraction but not specific programming. 2. The disadvantage of this is that when you need to modify the interface, you must first
modify all classesthat implement the interface. 3. When you cannot add new methods to the interface, it will not affect the existing display, so
has added the default method, We have
solved a series of problemswith interface modifications and display incompatibilities for everyone.
The above is the detailed content of Does the Java keyword contain 'default'?. For more information, please follow other related articles on the PHP Chinese website!