Monday, October 11, 2010

Reflection In Java

HI,
Today we are Going to know what is Reflection Concept in java?
Reflection :
Definition 1:
Java Reflection API's makes it Possible to inspect Classes,Interface,methods at runtime.
without knowing the names of the classes,methods at compile time.

Definition 2:
Reflection is a Powerful approach to analyze the class at runtime.If new classes are added into your application dynamically then Reflection is used to get the Structure of the Class.
The Object of Class type can hold all the information of the class and have getter methods to extract this information.
Definition 3:
Reflection API support for Querying information about a class at run-time.This information includes list of public as well as private members(methods) available for the class.

NOTE: Reflection is possible in the Java language because of late binding.
Example : Using Java Reflection API we can get the class name, by using the getName() method.
For Good Example Look at the below Link:


No comments:

AWS certification question

AWS AWS Hi! this is for questions related to AWS questions. EC2 instances EC2 storage types cold HDD : 1. Defines performance in terms...