What is annotation processing in Java?

前端 未结 3 1340
余生分开走
余生分开走 2020-12-14 20:18

Quoting, Sun\'s Official Java Tutorial

Class names, \'HelloWorldApp\', are only accepted if annotation processing is explicitly requested

3条回答
  •  没有蜡笔的小新
    2020-12-14 20:37

    From the very next line of the page that you refer to:

    Class names, 'HelloWorldApp', are only accepted if annotation processing is explicitly requested

    If you receive this error, you forgot to include the .java suffix when compiling the program. Remember, the command is javac HelloWorldApp.java not javac HelloWorldApp.

    That is, the string that you are referring to is a possible error that you might get when trying to compile the examples. The very next line in the document, tells you how to resolve the issue.

    If you want to know more about annotations, what they are, and how to use them, then I would suggest to go through the Annotations tutorial.

提交回复
热议问题