Here you can find the source of toInteger(String[] s)
public static Integer toInteger(String[] s)
//package com.java2s; public class Main { public static Integer toInteger(String[] s) { if (s == null || s.length == 0) return null; Integer result = null;//from ww w .ja v a 2s . c om try { result = Integer.valueOf(s[0]); } catch (NumberFormatException e) { } return result; } }