Question: Problem 3. (20 points) Reflection Task 1. Write a method displayMethodInfo (as a method of a class of your choosing), with the following signature static

 Problem 3. (20 points) Reflection Task 1. Write a method displayMethodInfo

Problem 3. (20 points) Reflection Task 1. Write a method displayMethodInfo (as a method of a class of your choosing), with the following signature static void displayMethodInfo (Object obj); The method writes, to the standard output, the type of the methods of obj. Please format the method type according to the following example: Suppose that obj is an instance of the following class class Af void foo(T1, T2) l.. 1 int bar (T1, T2, T3) f > static double doo) The output of displayMethodInfo (obj) should be as follows. foo (A, T1, T2) -> void bar (A, T1, T2, T3) -> int doo ()> double As you can see, the receiver type should be the first argument type. Methods declared static do not have a receiver, and should thus not display the class type as the first argument type. Task 2. Write a class named Test3, which, in its main method, tests your displayMethodInfo implementation

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!