package com.leo.demo;

/**
 * @author java
 */
public class MainClass {

    public static void main(String[] args) {
        Girl g = new Girl();
        g.sing();
        g.sleep();
    }

}

/**抽象类**/
abstract class Person {
    public void sing(){
        System.out.println("人人会唱歌");
    };
    /**抽象方法**/
    public abstract void sleep();
}

class Girl extends Person{
    @Override
    public void sing() {
        System.out.println("女孩会唱歌");
    }

    @Override
    public void sleep() {
        System.out.println("女的也要睡觉");
    }
}