appointment.java

来自「现在在国外大学里最流行的java学习软件,同时还有大量的example,在名为p」· Java 代码 · 共 41 行

JAVA
41
字号
/** * Record details of a diary appointment. *  * @author David J. Barnes and Michael Kolling * @version 2006.03.30 */public class Appointment{    // The reason for the appointment.    private String description;    // The length (in hours) of the appointment.    private int duration;    /**     * Create an appointment with a given duration.     * @param description The reason for the appointment.     * @param duration The length of the appointment in hours.     */    public Appointment(String description, int duration)    {        this.description = description;        this.duration = duration;    }    /**     * @return The description of the appointment.     */    public String getDescription()    {        return description;    }        /**     * @return The duration (in hours) of the appointment.     */    public int getDuration()    {        return duration;    }}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?