What purpose does Class.forName() serve if you don't use the return value?

classloader, java, jdbc

Solution

It performs a static loading of that class. So anything in the `static { }` block, will run.

Problem

I've seen this line in a sample application for using a commercial JDBC driver: ``` Class.forName("name.of.a.jcdb.driver") ``` The return value is not used. What purpose does this line serve?

Original source

Related problems