Reflection is a process that provide the ability to inspect and modify the
runtime behavior of applications. Using reflection we can inspect a
class,interface, enums, get their structure, methods and fields information at
runtime even though class is not accessible at compile time. We can also use
reflection to instantiate an object, invoke itís methods, change field values.
The java.lang.Class class provides many methods that can be used to get metadata, examine and change the run time behavior of a class.
The java.lang and java.lang.reflect packages provide classes for java reflection.
The java.lang.Class class performs mainly two tasks:
1 provides methods to get the metadata of a class at run time.
2 provides methods to examine and change the run time behavior of a class.
Used of Reflection:The Reflection API is mainly used in
1 IDE (Integrated Development Environment) e.g. Eclipse, MyEclipse, NetBeans etc.
3 Test Tools etc.
Core Java Interview Questions
Object Oriented Programming(OOP) Questions and Answers
Collections Interview Questions
Java Exceptions Interview Questions
Java Threads Interview Questions
Collection framework in java interview questions
oops concepts with example in java
Java Serialization Interview Questions
Top 20 Core Java Interview Questions with Answers
String Interview Question in java With Example
synchronization interview questions
Java Reflection Interview question
Java Executor Framework (JDK 1.5) Interview Questions
JDK 1.7 interview Questations and Answers
Java I/O interview question with example