Home > Java > javaTutorial > Does the Java keyword contain 'default'?

Does the Java keyword contain 'default'?

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2023-04-23 13:13:08
forward
1256 people have browsed it

Is default a java keyword:

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 .

Does the Java keyword contain default?

Introduction to default and java:

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 classes

that 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 problems

with 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!

Related labels:
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Issues
Install JAVA
From 1970-01-01 08:00:00
0
0
0
Unable to install java
From 1970-01-01 08:00:00
0
0
0
Can java be used as the backend of the web?
From 1970-01-01 08:00:00
0
0
0
Is this in Java language?
From 1970-01-01 08:00:00
0
0
0
Help: JAVA encrypted data PHP decryption
From 1970-01-01 08:00:00
0
0
0
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template