tabbycat.java

来自「程序练习中包括书中实例程序代码和练习中要用到的代码,是压缩文件」· Java 代码 · 共 19 行

JAVA
19
字号
package questions.c5;
// interface goes here
public class TabbyCat implements Cat {
   public void eat() {
      System.out.println( "munch munch" );
   }
   public void sleep() {
      System.out.println( "purr purr" );
   }
   public void play() {
      System.out.println( "pull on string" );
   }
   public static void main( String[] args ){
      TabbyCat boots = new TabbyCat();
      boots.eat();
      boots.play();
      boots.sleep();
   }
}

⌨️ 快捷键说明

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