Custom annotations can convey metadata about your program elements.
Source Code
import java.lang.annotation.*;
@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.METHOD)
public @interface MyCustomAnnotation {
int value();
}
class MyClass {
@MyCustomAnnotation(value = 10)
public void myMethod() {}
}