zoukankan      html  css  js  c++  java
  • Javadoc

    /**
     * The student class is basic class.
     * @author Leon
     *
     */
    public class Student {
    
    /**
     * @param name The student's name
     * @param id student's id
     */
        public Student(String name, int id) {
            studentName = name;
            studentId = id;
        }
    
    /**
     * Gets name of student
     * @return the name of student
     */
        public String getName() {
            return studentName;
        }
        
    /**
     * Gets id of student
     * @return the id of student
     */
        public int getId() {
            return studentId;
        }
        
    /**
     * sets the number of credits enarned.
     * @param credits The new number of credits earned
     */
        public void setCredits(double credits) {
            creditsEarned = credits;
        }
        
    /**
     * Gets the number of credits earned.
     * @return The number of credits this student has earned
     */    
        public double getCredits() {
            return creditsEarned;
        }
        
    /**
     * Sets whether the student is paid up.
     * @param flag The value true or false indicating paid-up status
     */    
        public void setPaidUp(boolean flag) {
            paidUp = flag;
        }
    
    /**
     * Returns whether the sutdent is paid up.
     * @return Whether the student is paid up.
     */
        public boolean isPaidUp() {
            return paidUp;
        }
    
    /**
     * Creates a string identifying this student.
     * @return The string used to display this student.
     */
        public String toString() {
            return studentName + " (#" + studentId + ")";
        }
    
    /* public constants */
        public static final double CREDITS_TO_GRADUATE = 32.0;
        
    /* Private instance variables */
        private String studentName;        /* The student's name */
        private int studentId;            /* The student's id */
        private double creditsEarned;    /* The number of credits earned */
        private boolean paidUp;            /* Whether student is paid up */
     
    }

    Javadoc

    /** 开头

    @param 这种特殊的

    可以通过 eclipse 等工具生成 java doc 文件.

    也可以使用命令 javadoc Student.java 来生成说明文档 (在 Student.java 同一个目录下)

  • 相关阅读:
    C#递归读取GIS目录文件格式
    ArcGIS Pro 2.5离线安装方案
    ASP.NET跨域解决方法
    C# GDAL编码问题3——读取中文图层
    C# GDAL编码问题2——读取中文属性
    C# GDAL编码问题1——打开mdb中文路径
    Word标题编号变黑框
    SVN设置全局忽略样式
    DevExpress中DockPanel样式修改
    解决XML根级别上的数据无效
  • 原文地址:https://www.cnblogs.com/moveofgod/p/12285016.html
Copyright © 2011-2022 走看看