ostrich.java

来自「初学者很好的一本入门书籍」· Java 代码 · 共 27 行

JAVA
27
字号
package zoo.birds;
public class Ostrich extends zoo.birds.Bird
{
	static private int count;
	
	public Ostrich()
	{
		setLegs(2);
		setKind("Ostrich");
		count++;
	}
	
	public void move()
	{
		System.out.println("Running");
	}
	
	public void hideHead()
	{
		System.out.println("Hidding the head...");
	}
	
	static public int getCount()
	{
		return count;
	}
}

⌨️ 快捷键说明

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