Here you can find the source of toInts(String[] values)
public static int[] toInts(String[] values)
//package com.java2s; public class Main { public static int[] toInts(String[] values) { int[] result = new int[values.length]; for (int i = 0; i < result.length; i++) { result[i] = Integer.parseInt(values[i].trim()); }//w ww.ja v a 2 s . co m return result; } public static String trim(String string, int maxLength) { if (string == null) { return null; } if (string.length() > maxLength) { return string.substring(0, maxLength); } return string; } }