继承

继承

package com.oop.Demo05;

public class Person {
   private int money = 10_0000_0000;

   public int getMoney() {
       return money;
  }

   public void setMoney(int money) {
       this.money = money;
  }

   public void say(){
       System.out.println("说了一句话");
  }
}
//ctrl+h
package com.oop.Demo05;

public class Application {
   public static void main(String[] args) {


       Student student = new Student();
       student.say();
       System.out.println();
  }
}
 
posted @ 2022-04-17 23:35  Mr~吴  阅读(12)  评论(0)    收藏  举报