Learn how to develop applications for Android mobile devices using simple examples, ready to run with your copy of the SDK. Author and Android columnist, writer, developer, and community advocate Mark L Murphy shows you what you need to know to ge
一、类加载器
类加载器(ClassLoader),顾名思义,即加载类的东西。在我们使用一个类之前,JVM需要先将该类的字节码文件(.class文件)从磁盘、网络或其他来源加载到内存中,并对字节码进行解析生成对应的Class对象,这是类加载器的功能。我们可以利用类加载器,实现类的动态加载。
二、类的加载机制
在Java中,采用双亲委派机制来实现类的加载。那什么是双亲委派机制?在Java Doc中有这样一段描述:
The ClassLoader class uses a de