Home > Java > javaTutorial > java what are annotations

java what are annotations

爱喝马黛茶的安东尼
Release: 2019-12-27 10:32:51
Original
3464 people have browsed it

java what are annotations

Concept: Explanation of the program. For the computer to see.

Comments: Use words to describe the program for programmers to see.

Definition: Annotation, also called metadata. A code-level description. It is a feature introduced in JDK1.5 and later versions, and is at the same level as classes, interfaces, and enumerations. It can be declared in front of packages, classes, fields, methods, local variables, method parameters, etc., and is used to explain and annotate these elements.

Concept description:

New features after JDK1.5

Describe the

usage annotation of the program: @annotation name

Function classification:

①Writing documents: Generate documents through the annotations identified in the code [Generate document doc document] We cannot change it ourselves, such as @since;

② Code analysis: Analyze the code through the annotations identified in the code [Use reflection];

③ Compilation check: The compiler can implement basic compilation checks through the annotations identified in the code [Override] 】We can't change it ourselves, such as @override.

PHP Chinese website has a large number of free JAVA introductory tutorials, everyone is welcome to learn!

The above is the detailed content of java what are annotations. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template