Browse Java Design Patterns & Enterprise Application Architecture

Marker Interfaces and Annotations

Compare marker interfaces and annotations in Java so metadata and framework signaling stay explicit and modern.

Marker interfaces and annotations both attach meaning to a type, method, or member without necessarily adding behavior. Java uses both, but they solve slightly different problems.

Marker interfaces were the older style: they signal capability through type membership. Annotations are the more expressive modern tool: they can target many program elements and carry structured metadata.

This section treats them as design tools, not just language trivia.

In this section

Revised on Thursday, April 23, 2026