dictionary.java
来自「java源程序 对初学者有很大的帮助 从简单到复杂」· Java 代码 · 共 22 行
JAVA
22 行
//********************************************************************
// Dictionary.java Author: Lewis/Loftus
//
// Represents a dictionary, which is a book. Used to demonstrate
// inheritance.
//********************************************************************
public class Dictionary extends Book
{
private int definitions = 52500;
//-----------------------------------------------------------------
// Prints a message using both local and inherited values.
//-----------------------------------------------------------------
public void definitionMessage ()
{
System.out.println ("Number of definitions: " + definitions);
System.out.println ("Definitions per page: " + definitions/pages);
}
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?