---
spec: JLS
title: "The Java Language Specification"
edition: "Java SE 27 Edition"
java_version: 27
chapter: "Chapter 9. Interfaces"
section: "9.7.2"
heading: "9.7.2. Marker Annotations"
parent: "9.7. Annotations"
source: https://docs.oracle.com/javase/specs/jls/se27/html/jls-9.html#jls-9.7.2
id: "9.7.2"
url: https://jvm.obfuscated.software/jls/se27/9.7.2.html
raw: https://jvm.obfuscated.software/jls/se27/9.7.2.md
---

# 9.7.2. Marker Annotations

A *marker annotation* is a shorthand designed for use with marker annotation interfaces ([§9.6.1](9.6.1.md)).

```
MarkerAnnotation:
  @ TypeName
```

It is shorthand for the normal annotation:

```
@TypeName()
```

It is legal to use marker annotations for annotation interfaces with elements, so long as all the elements have default values ([§9.6.2](9.6.2.md)).

**Example 9.7.2-1. Marker Annotations**

Here is an example using the `Preliminary` marker annotation interface from [§9.6.1](9.6.1.md):

```
@Preliminary public class TimeTravel { ... }
```
