⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 javadocdemo.java

📁 卡内基梅陇大学的网上教程 ssd3第一单元的源码
💻 JAVA
字号:

/**
 * <p>This class store the value of two integers.</p>
 * <p>This class is written for the purpose of demonstrating Javadoc
 * comments. Javadoc comments for classes can be broken into two
 * parts: a description part and a tags part.  This is the
 * description part.  The parts should be separated by one empty
 * comment line.</p>
 * <p>Also, there should be no lines between the end of the Javadoc
 * comment and the beginning of the entity it describes.</p>
 *
 * @author  Lily Hou
 * @author  Sean Bufano
 * @version  1.0.0
 */
package unitOne;

public class JavaDocDemo {

	private int  first;
	private int  second;

	/**
	 * Initializes both integers to <code>0</code>.
	 */
	public  JavaDocDemo()  {

		this.first = 0;
		this.second = 0;
	}

	/**
	 * Initializes both integers to arguments.
	 *
	 * @param initialFirst  value to which field <code>first</code>
	 *        is initialized
	 * @param initialSecond  value to which field <code>second</code>
	 *        is initialized
	 */
	public  JavaDocDemo(int  initialFirst, int  initialSecond)  {

		this.first = initialFirst;
		this.second = initialSecond;
	}

	/**
	 * Computes the sum of the two integers.
	 *
	 * @return  the sum of the two integers
	 */
	public int  sum()  {

		return  this.first + this.second;
	}

	/**
	 * Increments the field <code>first</code> by the argument.
	 *
	 * @param value  the value by which field <code>first</code> will
	 *        be incremented
	 */
	public void  addToFirst(int  value)  {

		this.first += value;
	}
}

⌨️ 快捷键说明

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