Using reflection to call methods of a Java class – A simple use case
We can use reflection feature of Java to invoke methods of a Java class. Suppose we have a class Employee, with getter methods for fields – name, age sex, salary, city. A user may want to send an array of property names to a method and based on the input…