Getting the Pair class superclass

The Pair class extends the Tuple class; therefore, the Tuple class is a superclass of Pair. We can obtain it via the Class.getSuperclass() method, as follows:

Class<?> superClass = clazz.getSuperclass();
// modern.challenge.Tuple
System.out.println("Superclass: " + superClass.getName());
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.119.122.82