# Annotation

A way of  marking a method so that the runtime knows to use it a certain way..

## What is an **Annotation**?

**Annotations** are used in languages like 
Java and TypeScript (Angular). Annotating a method is a way of 
marking it so that the execution runtime knows
to treat it differently.

In Java, JUnit annotations are used to specify 
which methods are test methods instead of core
code methods.

```java
public class TestClass {

    @Test()
    public void testMethod(){
        // test code goes here
    }
}
```

Level: Journeyman · [More Java terms at this level](https://www.ask-codey.com/glossary/subjects/java/journeyman)

Updated: October 16, 2026

Source: https://www.ask-codey.com/glossary/annotation
