MENU

包机制和生成文档

November 16, 2021 • 编程,JAVA阅读设置

包机制命名规范

一般利用公司域名倒置作为包名:

  • com.baidu.www

导入包

  • import 必须在包名下面(Alt+ 回车)

    import com.ember.base.Demo02
  • *:通配符,导入所有内容

    import com.ember.base.*

阿里巴巴 java 开发手册

JavaDoc

java 帮助文档(8)")

  • @author 作者名
  • @version 版本号
  • @since 指明需要最早使用的 jdk 版本
  • @param 参数名
  • @return 返回值情况
  • @throws 异常抛出情况

    • javadoc -encoding UTF-8 -charset UTF-8 Doc.java
    • -encoding是 java 代码编码,-charset 是对生成文档所用的编码。-windowtitle就是对应 html 的 标签</em></li></ul></li></ul> </div> <div class="tags"> <div itemprop="keywords" class="keywords QKaquQc"><a href="https://blog.emberweb.cn/index.php/tag/java/">java</a></div> <div class="modify-time">Last Modified: February 6, 2023</div> </div> </article> </div> </div> </div> <div id="body-bottom"> <div class="container"> <div class="post-near"> <nav> <span class="prev"><a href="https://blog.emberweb.cn/index.php/codes/class.html" title="类型拓展"><span class="post-near-span"><span class="prev-t no-user-select color-main">Next: </span><br><span>类型拓展</span></span></a></span> <span class="next"><a href="https://blog.emberweb.cn/index.php/codes/operator.html" title="运算符"><span class="post-near-span"><span class="prev-t no-user-select color-main">Prev: </span><br><span>运算符</span></span></a></span> </nav> </div> <div id="comments"> <div id="respond-post-90" class="respond"> <div class="cancel-comment-reply"> <a id="cancel-comment-reply-link" href="https://blog.emberweb.cn/index.php/codes/doc.html#respond-post-90" rel="nofollow" style="display:none" onclick="return TypechoComment.cancelReply();">取消回复</a> </div> <span id="response" class="widget-title text-left">Leave a Comment</span> <form method="post" action="https://blog.emberweb.cn/index.php/codes/doc.html/comment" id="comment-form"> <p> <textarea rows="5" name="text" id="textarea" placeholder="Input your comment here..." style="resize:none;" required></textarea> </p> <input class="comment-input" type="text" name="author" id="author" placeholder="Name *" value="" required /> <input class="comment-input" type="email" name="mail" id="mail" placeholder="Email *" value="" required /> <input class="comment-input" type="url" name="url" id="url" placeholder="Website" value="" /> <p style="margin-top: 10px"> <span class="OwO"></span> </p> <p><input type="submit" value="Submit" data-now="刚刚" data-init="Submit" data-posting="提交评论中..." data-posted="评论提交成功" data-empty-comment="必须填写评论内容" class="button" id="submit"></p> </form> </div> </div> </div> </div> </div><!-- end #body --> </div><!-- end #wrap --> <footer id="footer" role="contentinfo"> <div class="container" data-index="621"> <p>Copyright © 2024 <a href="https://blog.emberweb.cn/">Emblog</a></p><p><a href="https://beian.miit.gov.cn" target='_blank'> 粤ICP备2023005865号-1</a> • <a href="https://www.beian.gov.cn/portal/registerSystemInfo?recordcode=44030502009774" target='_blank'><img src="https://blog.emberweb.cn/usr/themes/Mirages/images/gonganwangbei.png" height='13' alt='公网安备图标' style='vertical-align: text-bottom'> 粤公网安备44030502009774号</a></p><p>Powered by <a href="http://typecho.org" target="_blank">Typecho</a> • Theme <a href="https://get233.com/archives/mirages-intro.html" target="_blank">Mirages</a></p> </div> </footer> <script src="https://blog.emberweb.cn/usr/themes/Mirages/static/jquery/2.2.4/jquery.min.js" type="text/javascript"></script> <script src="https://blog.emberweb.cn/usr/themes/Mirages/js/7.10.6/mirages.main.min.js" type="text/javascript"></script> <script type="text/javascript">Mirages.highlightCodeBlock();</script> <script type="text/x-mathjax-config"> MathJax.Hub.Config({ tex2jax: {inlineMath: [['$','$'], ['\\(','\\)']]}, skipStartupTypeset: true }); </script> <script src="https://blog.emberweb.cn/usr/themes/Mirages/static/mathjax/2.7.5/MathJax.js" type="text/javascript"></script> <script src="https://blog.emberweb.cn/usr/themes/Mirages/static/mathjax/2.7.5/config/TeX-AMS-MML_SVG.js" type="text/javascript"></script> <script type="text/javascript"> document.addEventListener('DOMContentLoaded', () => { pangu.spacingElementByClassName('post-content'); pangu.spacingElementByClassName('comment-content'); pangu.spacingElementById('toc-content'); }); </script> <script type="text/javascript">pangu.spacingElementByClassName('post-content');</script> <script type="text/javascript">Waves.init();</script> <script src="https://blog.emberweb.cn/usr/themes/Mirages/static/raphael/2.2.7/raphael.min.js"></script> <script src="https://blog.emberweb.cn/usr/themes/Mirages/static/flowchart/1.10.0/flowchart.min.js"></script> <script type="text/javascript">Mirages.renderFlowChart();</script> <script src="https://blog.emberweb.cn/usr/themes/Mirages/static/mermaid/9.2.2/mermaid.min.js"></script> <script type="text/javascript"> $(document).ready(function() { Mirages.renderMermaid(); }); </script> <script type="text/javascript"> (function ($) { if (typeof registCommentEvent === 'function') { registCommentEvent(); } Mirages.setupPage(); })(jQuery); </script> </body> </html>