This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
hi aakash, i've some points in mind. i'd assume that u already know reflection but strive to figure out its significance. 1. reflection is a heavy thing to use in the sense that we have to go through many things to invoke even a simple method on an object. 2. usually we don't need in our application code. 3. we need reflection when we want to build an application that will be dealing with classes that can be defined by the end user who uses the application and our application needs to know things about those classes. e.g. A) Java BeanBox- BeanBox uses reflection to know things about the Bean and uses it to display information in the Property Sheet etc.. B) Third party applications like "Rule Engine" which needs to allow loading/importing of the user defined classes so that the "Rule Engine" application can be used to define further "Rules" on "our" objects (this might be difficult to grasp as there is a new term "Rule Engine" but that is just an example. it can be any third party application that needs to import/load classes defined by us and allow us to do something more to those classes via that application) C) what will you do to build a tool that can import any classes and then create a object model diagram from it? we can use reflection to know information about classes and prepare the model. though i don't know issues in this application. the above 2 kinds are the biggest application of reflection i would say. also, think how would you know methods/variables in some classes if you were not given any javadoc, api , java source files and you just have .class files which are not obfuscated? of course, we need to use reflection to know methods etc in the classes.