1. 什麼是物件導向- 國立中山大學程式諮詢網 - Google Sites
文章推薦指數: 80 %
public class Student { String ID; String name; int age; //以下為建構子 public Student(String iD, String name, int age) { ID = iD; this.name = name; this.age = age; }} public String getInformation(){ return "學號ID"+" 姓名:"+name+" 年紀:"+age