### Question:
CustomClassLoader extends ClassLoader { public Class getClass(String name) throws ClassNotFoundException { byte[] b = loadClassFromFile(name); return defineClass(name, b, 0, b.length); }  Class getClass(String name);  }### Answer:
@Test public void customLoader() throws ClassNotFoundException, IllegalAccessException, InstantiationException, NoSuchMethodException, InvocationTargetException { CustomClassLoader customClassLoader = new CustomClassLoader(); Class<?> c = customClassLoader.getClass(PrintClassLoader.class.getName()); Object ob = c.newInstance(); Method md = c.getMethod("printClassLoaders"); md.invoke(ob); }