September 2019
Intermediate to advanced
816 pages
18h 47m
English
Starting with JDK 12, we can obtain the type descriptor of a class as a String object via the Class.descriptorString() method:
// Lmodern/challenge/Pair;System.out.println("Type descriptor of Pair: " + clazz.descriptorString());// Ljava/lang/String;System.out.println("Type descriptor of String: " + String.class.descriptorString());