Here you can find the source of toIntArray(String value)
public static int[] toIntArray(String value)
//package com.java2s; // Licensed under the Apache License, Version 2.0 (the "License"); you may public class Main { public static int[] toIntArray(String value) { int[] intArray = null; if (value != null) { String[] splitValueArray = value.split(","); intArray = new int[splitValueArray.length]; for (int index = 0; index < splitValueArray.length; ++index) intArray[index] = Integer.parseInt(splitValueArray[index].trim()); }/* w w w. j av a2 s.c o m*/ return intArray; } }