Here you can find the source of newInstance(Class clazz)
public static Object newInstance(Class clazz)
//package com.java2s; //License from project: Apache License public class Main { public static Object newInstance(Class clazz) { try {/*from w w w . ja v a2 s .co m*/ return clazz.newInstance(); } catch (InstantiationException e) { e.printStackTrace(); } catch (IllegalAccessException e) { e.printStackTrace(); } return null; } }