2011年7月6日 星期三

一級憤怒 - jAG104

public class MyBug09 {

   public static void main(String[] args){
  
       byte o = 200;
       for(int x=2;x<7;x++){
         if(x==5) break v;
         o=o+x;
       }
       v:
       System.out.println(o);
  }
}

這簡單程式, 幾個 "編譯憤怒" ?

1 Response to 一級憤怒 - jAG104

2011年7月10日 清晨7:04

有3個 "編譯憤怒"
class MyBug09 {
public static void main(String[] args) {
int o = 200;
for (int x=2; x<7; x++) {
o = o+x;
}
System.out.println(o);
}
}

張貼留言