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


          網站導航:
           
          主站蜘蛛池模板: 静安区| 宁国市| 孝义市| 策勒县| 礼泉县| 中方县| 宜宾市| 盈江县| 无极县| 五常市| 射阳县| 靖宇县| 梅河口市| 沭阳县| 杨浦区| 台安县| 积石山| 江津市| 安化县| 正镶白旗| 汾西县| 错那县| 杭州市| 惠水县| 博白县| 论坛| 从江县| 哈尔滨市| 威信县| 榆社县| 民权县| 措美县| 西盟| 余干县| 封丘县| 汉寿县| 邵阳县| 浠水县| 宁阳县| 昭通市| 鄂州市|