Java tutorial
//package com.java2s; public class Main { public static int[] fromIntString(String string) { String[] strings = string.replace("[", "").replace("]", "").split(", "); int result[] = new int[strings.length]; for (int i = 0; i < result.length; i++) { result[i] = Integer.parseInt(strings[i]); } return result; } }