blogger

点滴记忆

使用emlog搭建的站点

文章102

评论3

Hello
public class Hello {
    public static void main(String[] args) {
        System.out.println("Hello");
        Cat cat01 = new Cat();
        cat01.eat();
        int cat_legs = cat01.legs = 4;
        System.out.println(cat_legs);
    }

}

class Animal {
    protected int legs;
    public void eat() {
        System.out.println("eat");
    }
}

class Cat extends Animal {

}
评论(0)

© 2018  点滴记忆  · emlog
  Design by 往记