import java.io.IOException; import java.io.InputStream; /** * 类加载器与instanceof演示 * */ public class ClassLoadTest { public static void main(String[] args) throws InstantiationException, IllegalAccessException, ClassNotFoundException { ClassLoader classLoader = new ClassLoader() { @Override public Class<?> loadClass(String name) throws ClassNotFoundException{ try { String fileName = name.substring(name.lastIndexOf(".")+1)+".class"; InputStream is = getClass().getResourceAsStream(fileName); if(is == null){ return super.loadClass(name); } byte[] b