Reflection API is a powerful technique to find out its environment as well as to inspect the class itself. It allows the user to get the complete information about interfaces, classes, constructors, fields and  various methods being used. It also provides an easy way to create a Java Application that was not possible before. You can create methods like event handlers, hash code etc and also find-out the objects and classes.

With the help of Reflection API you can get the information about any class of the java.lang package. There are some useful methods like getName() and getInterfaces(), which allows us to retrieve the name of the class and the interfaces of the package respectively.

In the following section we are providing an example that will explain the working of Java Reflection API. Please click on the link to download the complete source code of this example. [Download]




Tagged with: JAVASource Code

Leave a Reply

Your email address will not be published.

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>


Looking for something?

Use the form below to search the site:

Still not finding what you're looking for? Drop a comment on a post or contact us so we can take care of it!

Related News Feeds

Set your Twitter account name in your settings to use the TwitterBar Section.