This week's book giveaway is in the Design forum.
We're giving away four copies of Building Microservices and have Sam Newman on-line!
See this thread for details.
The moose likes JDBC and Relational Databases and the fly likes Class.forName()? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Building Microservices this week in the Design forum!
JavaRanch » Java Forums » Databases » JDBC and Relational Databases
Bookmark "Class.forName()?" Watch "Class.forName()?" New topic


rakesh sugirtharaj
Ranch Hand

Joined: Dec 16, 2007
Posts: 151
In all jdbc connection classes i find this code

Class.forName("some driver String");

and the weirdest thing is that the return type(of class Class) is not stored anywhere. There is no assignment here. Then What is the use of this code?

Jan Cumps

Joined: Dec 20, 2006
Posts: 2543

This question has been discussed before on JavaRanch. Look here: Class.forname() return .
Regards, Jan

OCUP UML fundamental and ITIL foundation
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link:
subject: Class.forName()?
jQuery in Action, 3rd edition