作者TonyQ (骨頭)
看板java
標題Re: [問題] foreach指令
時間Fri Dec 29 14:32:50 2006
※ 引述《[email protected] (肉腳布)》之銘言:
: ==> [email protected] (巴哈專出死宅男) 提到:
: 這行有問題
: for(int tmp:a){
: 您確定您java與法對媽
這是 Java 1.5之後對for迴圈新增的模式,
用途是用tmp當token掃過a集合內的所有元素。
--
這讓我想到反覆器模式 囧~
--
String temp="relax"; | Life just like programing
while(buringlife) String.forgot(temp); | to be right or wrong
while(sleeping) brain.setMemoryOut(); | need not to say
stack.push(life.running); | the complier will
stack.push(scouting.buck()); | answer your life
stack.push(bowling.practice()); | Bone
everything
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 220.134.27.68