Here you can find the source of newInstance(Class
public static <T> T newInstance(Class<T> type)
//package com.java2s; //License from project: Apache License public class Main { /**/*from www . j a v a 2 s .co m*/ * A helper method to create a new instance of a type using the default * constructor arguments. */ public static <T> T newInstance(Class<T> type) { try { return type.newInstance(); } catch (InstantiationException e) { throw new RuntimeException(e); } catch (IllegalAccessException e) { throw new RuntimeException(e); } } }