介紹如何定義Java 的類別。 ... 宣告類別名稱public class Demo2 { // 這裡定義屬性int a; int b; // 這裡定義建構子public Demo2(int a, int b) { this.a = a; ...
確定! 回上一頁