Win a copy of Java Mock Exams (software) this week in the Programmer Certification (OCPJP) forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Class.forName()?

 
rakesh sugirtharaj
Ranch Hand
Posts: 151
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Bartender
Posts: 2618
14
C++ Linux Netbeans IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This question has been discussed before on JavaRanch. Look here: Class.forname() return .
Regards, Jan
 
What are you doing? You are supposed to be reading this tiny ad!
the new thread boost feature brings a LOT of attention to your favorite threads
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!