其實今天學的東西很多,不過可以記錄的不多
          1.
          A return statementt is required for a nonvoid method. The method shown below is logically correct, but it has a complication error because the Java complier thinks it possible that this method does not return any value.
          public static int sign(int n) {
          if (n < 0) return 1;
          else if (n == 0) return 0;
          else if (n > 0) return -1;
          }
          To fix problem, just delete (n > 0)

          posts - 403, comments - 310, trackbacks - 0, articles - 7
            BlogJava :: 首頁 :: 新隨筆 :: 聯系 :: 聚合  :: 管理

          1.22 Java notes

          Posted on 2007-04-22 20:22 ZelluX 閱讀(163) 評論(0)  編輯  收藏 所屬分類: OOP
          2007-01-22 22:00:47
          只有注冊用戶登錄后才能發表評論。


          網站導航:
           
          主站蜘蛛池模板: 屯留县| 靖远县| 社旗县| 清水县| 天祝| 和田市| 凤翔县| 根河市| 开阳县| 呼和浩特市| 澳门| 巴林左旗| 扬中市| 红原县| 富裕县| 永泰县| 长葛市| 临武县| 松潘县| 怀安县| 锡林郭勒盟| 盐山县| 通化县| 海林市| 封丘县| 恩平市| 泰顺县| 文安县| 嘉义市| 建始县| 延庆县| 炎陵县| 建平县| 饶平县| 南岸区| 循化| 壤塘县| 鄂托克前旗| 子长县| 庆云县| 天全县|