char Split Array - Java java.lang

Java examples for java.lang:String Split

Description

char Split Array

Demo Code


//package com.java2s;

public class Main {
    public static String[] charSplitArray(String str) {
        String[] rtn = new String[str.length()];
        for (int i = 0; i < str.length(); i++) {
            rtn[i] = "" + str.charAt(i);
        }//from  w  w w.ja v  a 2 s.  co m

        return rtn;
    }
}

Related Tutorials