Here you can find the source of valueOf(Integer value)
public static Integer valueOf(Integer value)
//package com.java2s; //License from project: Open Source License public class Main { public static Integer valueOf(Integer value) { return value != null ? value : 0; }/*from w w w . j a v a 2s . c o m*/ public static Long valueOf(Long value) { return value != null ? value : 0L; } public static Double valueOf(Double value) { return value != null ? value : 0L; } public static Float valueOf(Float value) { return value != null ? value : 0L; } }