- 708 名前:デフォルトの名無しさん mailto:sage [2007/10/14(日) 19:49:58 ]
- >>704
void hoge(){ public int total; array.each{int item => total += item;} System.out.println("合計は" + total); } とすると void hoge(){ final int total[] = new int[1]; array.each(new EachRunner(){ public void run(int item){ total[0] += item; } } System.out.println(合計は" + total[0]); } と変換されるという案が出てたはず。
|

|