答案:
public int update(int quantity, int adjust){
quantity = quantity + adjust;
return quantity;
}
public void callUpdate(){
int quant = 100;
quant = update(quant, 320);
System.out.println("The quantity is " + quant);
}
參考:6-2 Java 方法
JAVA,JAVASCRIPT,CSS,HTML,SCJP...等
沒有留言:
張貼留言