其實今天學的東西很多,不過可以記錄的不多
          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
          只有注冊用戶登錄后才能發表評論。


          網站導航:
           
          主站蜘蛛池模板: 平江县| 铁岭市| 庆云县| 滨州市| 怀化市| 锡林浩特市| 新田县| 和田县| 井陉县| 墨竹工卡县| 当阳市| 图木舒克市| 凌云县| 保靖县| 大英县| 阳江市| 商城县| 大邑县| 涡阳县| 长春市| 沅陵县| 将乐县| 五寨县| 洛隆县| 红河县| 通许县| 白沙| 名山县| 兴化市| 辽宁省| 广汉市| 庄河市| 垫江县| 长治县| 汤阴县| 连平县| 大竹县| 吉隆县| 扶风县| 彰化县| 北辰区|