Try
import java.util.ArrayList;
import java.sql.Array;
public class PrintClassLoader {
public static void main(String[] ags) {
System.out.println("Classloader of this class:" + PrintClassLoader.class.getClassLoader());
System.out.println("Classloader of Array:" + Array.class.getClassLoader());
System.out.println("Classloader of ArrayList:" + ArrayList.class.getClassLoader());
}
}
Classloader of this class:jdk.internal.loader.ClassLoaders$AppClassLoader@55054057
Classloader of Array:jdk.internal.loader.ClassLoaders$PlatformClassLoader@2626b418
Classloader of ArrayList:null
注:Java 9以后Extension class loader改为Platform class loader。
请问: 输出中 $ 代表什么?