Here you can find the source of convertStringToArray(String str)
public static int[] convertStringToArray(String str)
//package com.java2s; //License from project: Open Source License public class Main { public static int[] convertStringToArray(String str) { int[] A = new int[str.length()]; for (int i = 0; i < A.length; i++) { A[A.length - i - 1] = Integer.parseInt(str.substring(i, i + 1)); }/*from w w w . ja v a 2s.co m*/ return A; } }