This week's book giveaway is in the Clojure forum.
We're giving away four copies of Clojure in Action and have Amit Rathore and Francis Avila on-line!
See this thread for details.
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Job of class Class in jdbc

 
vinoth ar
Greenhorn
Posts: 21
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi friends...

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

thanks

 
Campbell Ritchie
Sheriff
Pie
Posts: 47270
52
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic