Home > Java > javaTutorial > body text

What is the essence of java annotations

王林
Release: 2023-05-14 16:34:06
forward
1252 people have browsed it

1. Description

(1) The essence of annotation is the interface that inherits the Annotation interface. At this point, any annotation category can be back-translated to get the result.

(2) A comment is just a special comment. If you don't analyze its code, it may not even be as good as comments.

2. Example

This is the definition of the annotation @Override. In fact, it is essentially:

public interface Override extends Annotation{
    
}
Copy after login

The typical annotation @Override, when When the compiler detects a method, and when the compiler detects the @Override annotation, the compiler checks whether the name actually overrides a certain method of the parent, that is, it compares whether the parent has the same method signature.

What are the characteristics of Java

1. As a representative of static object-oriented programming language, Java language implements object-oriented theory and allows programmers to perform complex programming with an elegant way of thinking.

2.Java has the characteristics of simplicity, object-oriented, distributed, security, platform independence and portability, and dynamic nature.

3. Use Java to write desktop applications, Web applications, distributed systems and embedded system applications, etc.

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

Related labels:
source:yisu.com
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