zoo.java
来自「初学者很好的一本入门书籍」· Java 代码 · 共 23 行
JAVA
23 行
public class Zoo
{
public static void main(String argv[])
{
Bird bird1 = new Bird();
Bird bird2 = new Bird();
Ostrich ostrich1 = new Ostrich();
Fish fish1 = new Fish();
Fish fish2 = new Fish();
Fish fish3 = new Fish();
Fish fish4 = new Fish();
Lion lion1 = new Lion();
Lion lion2 = new Lion();
System.out.println("Total Animal:" + Animal.getCount());
System.out.println("Total Bird:" + Bird.getCount());
System.out.println("Total Fish:" + Fish.getCount());
System.out.println("Total Lion:" + Lion.getCount());
System.out.println("Total Ostrich:" + Ostrich.getCount());
}
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?