其實今天學的東西很多,不過可以記錄的不多
          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 閱讀(162) 評論(0)  編輯  收藏 所屬分類: OOP
          2007-01-22 22:00:47
          只有注冊用戶登錄后才能發表評論。


          網站導航:
           
          主站蜘蛛池模板: 吴川市| 华阴市| 沙河市| 辽阳市| 镇沅| 十堰市| 南漳县| 镇巴县| 宁乡县| 平江县| 兴化市| 迭部县| 盐源县| 七台河市| 巴彦淖尔市| 岐山县| 永安市| 西林县| 梨树县| 砀山县| 德江县| 耿马| 珲春市| 阿瓦提县| 沽源县| 灌云县| 阳西县| 瑞丽市| 嵩明县| 静宁县| 临猗县| 张家川| 梁河县| 大荔县| 扶绥县| 保康县| 天台县| 三都| 台山市| 长兴县| 阜新|