Java reflection get constructor from class name failed [closed]
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed last year . I've this code snippet: class You{ public You(String s){} } public static void main(String[] args) throws NoSuchMethodException { Constructor[] constructors = You.class.getConstructors(); for(Constructor constructor: constructors){ Class[] parameterTypes = constructor.getParameterTypes(); for(Class c: