面向對象(繼承、多態、接口)

繼承的例子 class Person { public String name = "小明"; public int age = 20; } class Student extends Person { void study() { System.out.println("I want to study!"); } } public class
相關文章
相關標籤/搜索