PrepZone Logo
PrepZone
Back to Java

Java · Medium

What is the role of Class.forName()?

JavaCore JavaJVM

Answer preview

Class.forName(String className) dynamically loads the class into the JVM and returns the corresponding Class<?> object.…