This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes JDBC and the fly likes Job of class Class in jdbc Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "Job of class Class in jdbc" Watch "Job of class Class in jdbc" New topic

Job of class Class in jdbc

vinoth ar

Joined: Jan 07, 2009
Posts: 21
hi friends...

can you explain what is the job of class Class(i.e the class in Class.forName(..)); im jdbc..


Campbell Ritchie

Joined: Oct 13, 2005
Posts: 38045
It is actually the forName() method which does the work. forName() is a static method of Class; it causes the named class object to be loaded by a class loader. So the JDBC connection class is loaded into memory for access by the JVM.
The JDBC classes incorporate a static initialiser block, which is executed immediately after the class is loaded into memory; this static initialiser calls method which institute the actual connection.
I agree. Here's the link:
subject: Job of class Class in jdbc
Similar Threads
Loading file data into a DB2 table using java
Need guidance for SCJD exam preparation
struts 1.3 Data base connection pool
java sql parser
Need help to write a bot to collect data from internet.