interface student{
    public void study();
}

interface studentworker extends student{
    public void earn();
    
}
public class Goodstudent implements studentworker {
    String name;
    public Goodstudent(String name){
        this.name=name;
    }
    void job(){
        System.out.println(name+"是好男人!!!");
    }
    public static void main(String[] args) {
        Goodstudent a=new Goodstudent("刘煜炀");
        a.study();
        a.earn();
        a.job();
    }
    public void study() {
        System.out.println(name+"会学习!!");        
    }
    public void earn() {
        System.out.println(name+"会赚钱!!");    
        
    }

}

 

posted on 2019-05-15 22:25  刘煜炀  阅读(78)  评论(0编辑  收藏  举报