Class.newInstance
Class Overview | Class Members |
This Package |
All Packages
public native Object newInstance() throws InstantiationException, IllegalAccessException
Returns
a newly allocated instance of the class represented by this
object. This is done exactly as if by a new
expression with an empty argument list.
Description
Creates a new instance of a class.
Exceptions
IllegalAccessException
if the class or initializer is
not accessible.
Exceptions
InstantiationException
if an application tries to
instantiate an abstract class or an interface, or if the
instantiation fails for some other reason.