Java Char Array Create toCharArray(String string)

Here you can find the source of toCharArray(String string)

Description

to Char Array

License

Open Source License

Declaration

public static char[] toCharArray(String string) 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

public class Main {
    public static char[] toCharArray(String string) {
        char[] result = new char[string.length()];
        for (int i = 0; i < result.length; i++) {
            result[i] = string.charAt(i);
        }/*ww w  .  ja  va 2  s. com*/

        return result;
    }
}

Related

  1. toCharArray(String s)
  2. toCharArray(String s)
  3. toCharArray(String str)
  4. toCharArray(String str)
  5. toCharArray(String str)
  6. toCharArray(String[] v)
  7. toCharArray(StringBuffer stringbuffer)
  8. toCharArrays(String[] a)
  9. toClassArray(final Object[] args)