Here you can find the source of valueOf(String s)
@Deprecated public static int valueOf(String s)
//package com.java2s; //License from project: Apache License public class Main { /** @deprecated */ @Deprecated public static int valueOf(String s) { return !isNumeric(s) ? 0 : Integer.valueOf(s).intValue(); }/*from w w w .ja va 2s . c om*/ public static boolean isNumeric(String s) { if (s != null && !s.equals("")) { int i = s.length(); do { --i; if (i < 0) { return true; } } while (Character.isDigit(s.charAt(i))); return false; } else { return false; } } }