Extend the code of Figure 16.4 to print information about (a) Fields (b) Constructors (c) Nested classes

Question:

Extend the code of Figure 16.4 to print information about

(a) Fields

(b) Constructors

(c) Nested classes

(d) Implemented interfaces

(e) Ancestor classes, and their methods, fields, and constructors

(f) Exceptions thrown by methods

(g) Generic type parameters

Figure 16.4:

import static java.lang.System.out; public static void listMethods (String s) throws java.lang.ClassNotFoundException { Class c = Class.forName (s); for (Method m : c.getDeclaredMethods ()) { out.print (Modifier.toString (m.getModifiers ()) +

Fantastic news! We've Found the answer you've been seeking!

Step by Step Answer:

Related Book For  book-img-for-question
Question Posted: