zoukankan      html  css  js  c++  java
  • 把一段逗号分割的字符串转换成一个数组

    package cn.java.api;

    /**
     * 把一段逗号分割的字符串转换成一个数组
     * @author <a href="mailto:809306794@qq.com">邱云</a>
     * @version v1.0 2013-9-7
     */
    public class Split {
        public static void main(String args[]){
            String str = "a,b,c,d,e";
            String [] result = str.split(",");
            for(int i = 0;i<result.length;i++){
                System.out.print("result["+i+"]="+result[i]+" ");
            }
        }
    }

  • 相关阅读:
    浮点数
    2020.07.13
    2020.07.07
    2020.07.06
    剑指offer(三)
    剑指offer(二)
    剑指offer
    堆排序
    归并排序
    希尔排序
  • 原文地址:https://www.cnblogs.com/qq809306794/p/3307813.html
Copyright © 2011-2022 走看看