[Java]Thinking in Java 练习2.14

题目

在文档中加入各项的HTML列表。

 

代码

 1 // object/Documentation4.java
 2 // TIJ4 Chapter Object, Exercise 14, page 90
 3 // Add an HTML list of items to the documentation in the previous exercise.
 4 import java.util.*;
 5 
 6 // object/Documentation4.java
 7 /**
 8 * You can even insert a list:
 9 * <ol>
10 * <li> Item one
11 * <li> Item two
12 * <li> Item three
13 * </ol>
14  
15 
16         
17         * Another test list
18         * <ol>
19         * <li> One
20         * <li> Two
21         * <li> Three
22         * </ol>
23         */    
24 
25 public class Ex2_14 {
26 
27         /** Let's try a public field list
28         * <ol>
29         * <li> One
30         * <li> Two
31         * <li> Three
32         * </ol>
33         */    
34         
35         public int i = 2;
36 
37         /**
38         * A private field list (-private to see) 
39         * <ol>
40         * <li> One
41         * <li> Two
42         * <li> Three
43         * </ol>
44         */    
45 
46         private int j = 3;
47 
48         /**
49         * Another list can be inserted here to help explain the
50         * following method call
51         * <ol>
52         * <li> One
53         * <li> Two
54         * <li> Three
55         * </ol><br>
56         * but may be formatted differently in Method Summary
57         */    
58 
59     public static void main(String[] args) {
60 
61         /**
62         * Let's try another test list here
63         * <ol>
64         * <li> One
65         * <li> Two
66         * <li> Three
67         * </ol>
68         */    
69 
70         Date d = new Date();
71         System.out.println("d = " + d);
72     }
73 }
View Code

 

HTML文档

 

posted @ 2018-04-01 16:58  zyy是一只超级大沙茶  阅读(182)  评论(0编辑  收藏  举报