class Car { private int age; private String brand; public Car(int a, String b) { age = a; brand = b; } public Car(int a) { age = a;
4/22/2020class CCircle // 定義類別CCircle { int radius; //宣告資料成員 static int count=0; // 資料成員count被宣告為static,表示屬於類別的,並不屬於各個物件分別擁有 public int show() { count++; return radius; } }
4/21/2020Java程式的輸入、輸出大致上包含以下幾類: 輸入整數 輸入浮點數 import java.util.*; import java.lang.*; import java.io.*; /* Name of the class has to be "Main" only if the class is public. */
4/17/2020or
By clicking below, you agree to our terms of service.
New to HackMD? Sign up