随笔-71  评论-5  文章-0  trackbacks-0
         
             原本写了 if  else  判断股票所属板块的,觉得繁琐,就去改了下面的

                  public static void main(String[] args) {
    String code ="002348";
    String stock = "002".equals(code.substring(0,3)) ? "002" : code.substring(0,1);
System.out.println(stock);
}

               然后跑去得瑟,被鄙视了,然后  ↓↓↓↓

                 public static String getPlateInfo(String code){
    return code.startsWith("002") ? "002" : code.substring(0,1);
                  }

            还补了一刀,你看你写的什么玩意儿,哼,好想让他跪搓衣板
posted on 2015-07-02 00:26 藤本蔷薇 阅读(227) 评论(0)  编辑  收藏

只有注册用户登录后才能发表评论。


网站导航: