Java Array From toArray(String number)

Here you can find the source of toArray(String number)

Description

to Array

License

Open Source License

Declaration

private static int[] toArray(String number) 

Method Source Code

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

public class Main {

    private static int[] toArray(String number) {
        int[] array = new int[number.length()];
        for (int i = 0; i < number.length(); i++) {
            array[i] = Integer.parseInt(number.substring(i, i + 1));
        }//  w w  w. j  a  va  2  s  . co  m
        return array;
    }
}

Related

  1. toArray(Object o)
  2. toArray(Object... args)
  3. toArray(Object... values)
  4. toArray(String array)
  5. toArray(String emails)
  6. toArray(String s)
  7. toArray(String s)