Here you can find the source of newInstanceHard(String name)
public static Object newInstanceHard(String name)
//package com.java2s; //License from project: Open Source License public class Main { public static Object newInstanceHard(String name) { try {//from w ww . j a va 2 s .c o m return Class.forName(name).newInstance(); } catch (ClassNotFoundException e) { throw new RuntimeException(e); } catch (InstantiationException e) { throw new RuntimeException(e); } catch (IllegalAccessException e) { throw new RuntimeException(e); } } }