Java Reflection API - What is Reflection API in Java?

What is Reflection API in Java?

The Reflection API allows Java code to examine classes and objects at run time. The new reflection classes allow you to call another class's methods dynamically at run time. With the reflection classes, you can also examine an instance's fields and change the fields' contents.
The Reflection API consists of the java.lang.Class class and the java.lang.reflect classes: Field, Method, Constructor, Array, and Modifier.

What is Reflection API in Java?

Reflection is a process that is used to examine the runtime behaviour of a running application in the JVM. Reflection API allows the creation of an instance of a class whose name is not known until runtime. The custom processing classes can be plug-in into the system, without recompiling the code again. All these processing class are derived by the base class ‘MassageProcessor’.
Java Shallow & Deep cloning - Explain Shallow & deep cloning.
Java Shallow & Deep cloning - Cloning of objects can be very useful if you use the prototype pattern or if you want to store an internal copy of an object....
Java private constructor - Explain the impact of private constructor.
Java private constructor - Private Constructors can't be access from any derived classes neither from another class. .....
Java Static Initializers - What are static Initializers?
Java Static Initializers - A static initializer block resembles a method with no name, no arguments, and no return type...
Post your comment