Q: What is it reflection (introspection) ? Why is reflection possible in the Java language?

Reflection (introspection) is querying a class about its properties, and operating on methods and fields by the name for a given object instance. Reflection is possible in the Java language because of late binding.

Showing Answers 1 - 1 of 1 Answers

There are generally two types of reflection
1) Introspection
2) Intercession

In Interospection we can see the features of a class or object of our interest using the methods available. Java just supports introspection, C++ doesn't even support this maybe very remotely.

In Intercession we are actually able to make changes in the class i.e we not only can see but also can modify what we see.. Java doesn't support it.. OpenJava,OpenC++
 are some technologies which give us some intercession facilities

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions