[JAVA] static-靜態類別變數

class Car{
 public static void show(){
  System.out.println("static show");
 }
}
class Sample4{
 public static void main(String[] args){
  Car.show();
  Car car1=new Car();
  car1.show();
 }
}

沒有留言: