Java tutorial
//package com.java2s; public class Main { public static Object newInstance(Object model) { Object instance = null; try { Class<?> aClass = model.getClass(); instance = aClass.newInstance(); } catch (InstantiationException e) { // TODO Auto-generated catch block e.printStackTrace(); } catch (IllegalAccessException e) { // TODO Auto-generated catch block e.printStackTrace(); } return instance; } }