zoukankan      html  css  js  c++  java
  • [Java]Thinking in Java 练习2.12

    题目

    对HelloDate.java的简单注释文档的示例执行javadoc,然后通过Web浏览器查看结果。

    代码

     1 //: HW/Ex2_2.java
     2 import java.util.*;
     3 
     4 /** The first Thinking in Java example program.
     5  * Displays a string and today's date.
     6  * @author zyy
     7  * @version 4.0
     8 */
     9 public class Ex2_12 {
    10   /** Entry point to class and application.
    11    *  @param args array of string arguments
    12    */
    13   public static void main(String[] args) {
    14     System.out.println("Hello, it's: ");
    15     System.out.println(new Date());
    16   }
    17 } /* Output: (55% match)
    18 Hello, it's: 
    19 Sun Apr 01 16:05:00 CST 2018
    20 *///:~

    执行javadoc生成HTML文件

    在eclipse中

    找到JDK下的javadoc.exe。而doc的生成位置默认为工程目录下,即第三个框内的路径。

    勾选Document title并命名

    选择JDK的版本,一般默认就可以了。

    生成HTML文件,可以在目录下看到。

    双击可以打开

     

    搞定!

  • 相关阅读:
    flex-direction
    flex-grow
    Push API
    ServiceWorker.state
    Using Service Workers
    Promise.then
    Promise()
    Using promises
    node-rsa
    async.waterfall
  • 原文地址:https://www.cnblogs.com/CQBZOIer-zyy/p/8687055.html
Copyright © 2011-2022 走看看