第49題 Place code framgmets into position so the output is: The quantity is 420 Place here update(int quantity, int adjust){ Place here } public void callUpdate(){ int quant = 100; Place here System.out.println("The quantity is " + quant); } Code Fragments public int quantity = quantity + adjust; update(quant, 320); public void quant = update(quant, 320); public int update(int quantity, int adjust){ } public void callUpdate(){ int quant = 100; quant = update(quant, 320); System.out.println("The quantity is " + quant); }
詳解 (共 10 筆)
詳解
1111111111111111111111111111111
詳解
zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz
詳解
update(int quantity, int adjust){ Place here } public void callUpdate(){ int quant = 100; Place here System.out.println(\"The quantity is \" + quant); } Code Frag
詳解
public void callUpdate(){ int quant = 100; quant = update(quant, 320); System.out.println(\"The quantity is \" + quant); }
詳解
Place code framgmets into position so the output is: The quantity is 420 Place here update(int quantity, int adjust){ Place here } public void callUpdate(){ int quant = 100; Place here System.out.println(\"The quantity is \" + quant); } Code Fragments public int quantity = quantity + adjust; update(quant, 320); public void quant = update(quant, 320); public int update(int quantity, int adjust){ } public void callUpdate(){ int quant = 100; quant = update(quant, 320); System.out.println(\"The quantity is \" + quant); }
阿摩線上測驗: http://www.yamol.tw/testpaper.php?rid=34341078#ixzz4yH2d20BE
詳解
0000000000
詳解
420100
詳解
The quantity is 320
詳解
zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz
詳解
NICE