package com.lovecoding.day23.relect;

public class Test05 {


    public static void main(String[] args) throws ClassNotFoundException {
        // 类加载器
        ClassLoader c1 = String.class.getClassLoader();
        System.out.println("加载String类的类加载器：" + c1); //跟加载器 获取不到 返回null

        //ClassLoader c2 = Class.forName("sun.util.resources.cldr.zh.TimeZoneNames_zh").getClassLoader();
        //System.out.println("加载sun.util.resources.cldr.zh.TimeZoneNames_zh类的类加载器：" + c2); 扩展

        ClassLoader c3 = Test05.class.getClassLoader();
        System.out.println("加载当前类的类加载器：" + c3);

        //组合
        System.out.println(c3.getParent());
        System.out.println(c3.getParent().getParent());
    }
}