Java Class New Instance newInstance(Class classOf)

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

Description

new Instance

License

Open Source License

Declaration

public static <T> T newInstance(Class<T> classOf) 

Method Source Code

//package com.java2s;

public class Main {
    public static <T> T newInstance(Class<T> classOf) {
        try {/*from   w ww.ja  va 2s. c  om*/
            return classOf.newInstance();
        } catch (InstantiationException | IllegalAccessException ex) {
            return null;
        }
    }
}

Related

  1. newInstance(Class beanClass)
  2. newInstance(Class c)
  3. newInstance(Class c)
  4. newInstance(Class c, Class[] argTypes, Object[] args)
  5. newInstance(Class cl)
  6. newInstance(Class clazz)
  7. newInstance(Class clazz)
  8. newInstance(Class clazz)
  9. newInstance(Class clazz)