This week's book giveaway is in the OCPJP forum.
We're giving away four copies of OCA/OCP Java SE 7 Programmer I & II Study Guide and have Kathy Sierra & Bert Bates on-line!
See this thread for details.
The moose likes Beginning Java and the fly likes What is reflection and introspection in java. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCA/OCP Java SE 7 Programmer I & II Study Guide this week in the OCPJP forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "What is reflection and introspection in java." Watch "What is reflection and introspection in java." New topic
Author

What is reflection and introspection in java.

Manish Jaju
Greenhorn

Joined: Jul 21, 2004
Posts: 24
What is reflection and introspection in java. Will someone elaborate it with example and how it is used in programs. I will be very thankful.
Raj Chila
Ranch Hand

Joined: Mar 18, 2004
Posts: 128

Hi Manish,

Reflection and introspection refer to the same concept, of looking up a Class programmatically and inspecting the class like how many methods does it have, what are the super classes, implemented interfaces etc....in short you can actually "read" a class.
Not only that, you can also use this concept successfully to create Applications etc.
a good place to start is here(Reflection Tutorial)

A lot of Frameworks depends on reflection like Struts etc, and soon you will appreciate the many ways you can use reflection.
 
 
subject: What is reflection and introspection in java.