Constructor <User> constructor = User.class.getConstructor(new Class[]{String.class,String.class,String.class}); System.out.println("Constructor "+constructor); constructor.newInstance("Hello","From","Reflection"); From this example, it is clear to me that when a constructor is passed to it, an Object of an array of type Class .
But it is misleading: Class.class then allowed to call the Reflection API methods. What does this .class mean?
I know that to access the methods I need to create an object of any class, or if the method is static, then access will be made through the class name .. In the case of access to the Reflection API, this is the end of .class, I can call .class on any class or interface or primitive int.class as a JVM (if it is right to say so) refers to this kind of constructions? What is it and why is it used?