其實(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)航:
           
          主站蜘蛛池模板: 高陵县| 永春县| 定边县| 宁德市| 鲁山县| 石城县| 深水埗区| 古丈县| 林芝县| 东安县| 涞源县| 古田县| 澄江县| 兰溪市| 潜山县| 文昌市| 裕民县| 连云港市| 哈密市| 泰和县| 伊宁县| 理塘县| 唐河县| 遵义县| 茂名市| 桐庐县| 马公市| 汶上县| 左云县| 蓝山县| 南宫市| 石屏县| 涿鹿县| 婺源县| 灵寿县| 金乡县| 西乌| 兴安盟| 南阳市| 宾川县| 密云县|