Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General 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: 2588
11
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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic