方法的定義
方法作用
節省重複代碼編寫,分工合作
格式
修飾符 返回值 方法名(參數列表){
方法體
}
public void show(){
System.out.println{"這是一個方法"}
}
public class method {
public static
節省重複代碼編寫,分工合作
修飾符 返回值 方法名(參數列表){
方法體
}
public void show(){
System.out.println{"這是一個方法"}
}
public class method {
public static