Author sign annotation

Report a typo

Define an annotation that can be used to sign a method's author like in the following snippet:

@Author(name = "Jane Johnson")
public void method() {...}

Apply this annotation to TestClass methods.

Write a program in Java 17
@interface Author {

}

class TestClass {
public void myMethod() {
// some code
}
}
___

Create a free account to access the full topic