Java newInstance

Java newInstance


Java newInstance

With the Class object, following operations can be performed. There are three methods in the Class.

1. public native boolean isInterface();
2. public native boolean isArray();
3. public native boolean isPrimitive();

The above methods are used in the following program.

Java newInstance

With the methods isInterface() and isArray(), we can check a class object represents an interface or an Array.

View All for Java Differences on 90 Topics

Leave a Reply

Your email address will not be published. Required fields are marked *