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


          網站導航:
           
          主站蜘蛛池模板: 黄骅市| 丰都县| 遂昌县| 灵石县| 武冈市| 泊头市| 连州市| 和静县| 东港市| 封开县| 关岭| 浦北县| 张家港市| 宁蒗| 宁国市| 封开县| 巫山县| 青川县| 上饶县| 连江县| 嘉定区| 穆棱市| 吕梁市| 贞丰县| 韶关市| 古田县| 阿合奇县| 逊克县| 双牌县| 涟水县| 中卫市| 蓬安县| 巴彦淖尔市| 徐闻县| 澜沧| 大石桥市| 盐源县| 曲周县| 泗洪县| 东宁县| 丰县|