例4-9.txt

来自「Java大学实用教程 耿祥义编著 课件 PPT」· 文本 代码 · 共 19 行

TXT
19
字号
class Tom
{
   int leg;
   Tom(int n)
   {
        this.cry();
        leg=n;
        this.cry(); 
   }
   void cry()
   {
        System.out.println("我是Tom ,我现在有"+leg+"条腿");
   }
   public static void main(String args[])
   {
        Tom tom=new Tom(4);
   }
}

⌨️ 快捷键说明

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