Online Java Compiler By
JavaTpoint.com
import java.lang.reflect.Constructor; import java.util.Arrays; public class ClassgetDeclaredConstructorsExample2 { public ClassgetDeclaredConstructorsExample2 () { } public ClassgetDeclaredConstructorsExample2(int intgr) { } private ClassgetDeclaredConstructorsExample2(String str) { } public static void main(String... args) { Constructor>[] constrct = ClassgetDeclaredConstructorsExample2.class.getDeclaredConstructors(); Arrays.stream(constrct).forEach(System.out::println); } }
Output