Getting a class for an array type whose component type is described by Pair

Starting with JDK 12, we can get Class for an array type whose component type is described by the given class via Class.arrayType():

Class<?> arrayClazz = clazz.arrayType();

// modern.challenge.Pair<L,R>[]
System.out.println("Array type: " + arrayClazz.toGenericString());
..................Content has been hidden....................

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