Javadoc for local variables?

前端 未结 6 1344
名媛妹妹
名媛妹妹 2021-01-17 09:33

Short question: Is it possible to create Javadoc for local variables? (I just want an explanation for my local variable when hovering over it in Eclipse) Thanks for any hint

6条回答
  •  无人及你
    2021-01-17 10:33

    Yes it's possible. Just make a regular javadoc comment above the variable.

    public class ExampleClass {
        /** A really cool variable */
        int localVariable;
    
        ...
    

    Now you can hover above the variable in the code further down and the comment will be shown.

提交回复
热议问题