Grokking Java Interview Questions
Vote

0% completed

​

Reflection

A program can do the following at run time with a class whose name was unknown when the program was compiled:

  • List the fields, methods, and constructors of the class.
  • Create an object through one of its constructors.
  • Read and change a field, in many cases even a private one.
  • Call a method whose name is in a string.

The API for this is called reflection. Its main parts are java.lang.Class and the package java.lang.reflect

.....

.....

.....

Like the course? Get enrolled and start learning!

Reading Progress

0%


Vote for new content