Java Class New Instance newInstance(Class clazz)

Here you can find the source of newInstance(Class clazz)

Description

new Instance

License

Apache License

Declaration

public static Object newInstance(Class clazz) 

Method Source Code

//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;
    }
}

Related

  1. newInstance()
  2. newInstance(Class clazz)
  3. newInstance(Class clazz)
  4. newInstance(Class clazz)
  5. newInstance(Class clazzName)
  6. newInstance(Class cls)