java处理字符串分割

 public List mysplit(String unid){
       List<String> MessageList = new ArrayList<String>();
        String [] referealReasons = unid.split(";");
        for(String b :referealReasons){
            MessageList.add(b);
        }       
        for(String l :MessageList){
            System.out.println(l);
        }
       return  MessageList;
   }

你可能感兴趣的:(java)