Here you can find the source of getDefaultValue(Class> primitive)
public static Object getDefaultValue(Class<?> primitive)
//package com.java2s; //License from project: Apache License import java.util.HashMap; import java.util.Map; public class Main { private static final Map<Class<?>, Object> defaultPrimitiveValues = new HashMap<>(); public static Object getDefaultValue(Class<?> primitive) { return defaultPrimitiveValues.get(primitive); }//from w ww.j a va 2 s. c om }