WHAT IS A RULES FOR DEFINING ANNOTATION TYPES

Jonas Stuart

Total Post:26

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

    Post:26

    Points:130
    What is a rules for defining annotation types

     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 Jul-15-2016 07:47:52 AM

Answer

NEWSLETTER

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