WHAT IS A RULES FOR DEFINING ANNOTATION TYPES

Jonas Stuart

Total Post:26

Points:130
Posted by  Jonas Stuart
 456  View(s)
Ratings:
Rate this:
  1. Jonas Stuart

    Post:26

    Points:130
    What is a rules for defining annotation types

    ·    An annotation declaration starts with @interface, followed by the annotations name.

    ·   To create parameters for an annotation, you declare methods in its type.

    ·   Method declarations should not contain any parameters.

    ·    Method declarations should not contain any throws clauses.

         Return types of the method should be one of the following:

    • Primitive
    • String
    • Class
    • Enum

      Modified On Mar-28-2018 06:29:54 AM

Answer

NEWSLETTER

Enter your email address here always to be updated. We promise not to spam!