其實(shí)今天學(xué)的東西很多,不過(guò)可以記錄的不多
          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 :: 首頁(yè) :: 新隨筆 :: 聯(lián)系 :: 聚合  :: 管理

          1.22 Java notes

          Posted on 2007-04-22 20:22 ZelluX 閱讀(163) 評(píng)論(0)  編輯  收藏 所屬分類(lèi): OOP
          2007-01-22 22:00:47
          只有注冊(cè)用戶(hù)登錄后才能發(fā)表評(píng)論。


          網(wǎng)站導(dǎo)航:
           
          主站蜘蛛池模板: 长阳| 修水县| 安义县| 荥阳市| 临沭县| 报价| 西平县| 尼木县| 紫阳县| 南昌县| 团风县| 娄底市| 洛川县| 哈巴河县| 蛟河市| 诏安县| 滨海县| 唐河县| 金门县| 东台市| 临漳县| 璧山县| 高安市| 乡宁县| 库尔勒市| 澄江县| 大城县| 西峡县| 特克斯县| 山东省| 广西| 凤城市| 信丰县| 瑞丽市| 融水| 泰兴市| 天台县| 郴州市| 陆丰市| 怀集县| 资溪县|