java之String字符串根据指定字符转化为字符串数组

public  static  void  main(String[] args){
        String str="护肤,药品,其他";
        String temp[];
        temp=str.split(",");
        for (String s : temp) {
            System.out.println("s: "+s);
        }

    }

原文

原文地址:https://www.cnblogs.com/linmob/p/14471690.html