Gravitation cannot be held responsible for people falling in love ~ Albert Einstein
Regards,
Chandra sekaran M
Why is manual stuff like :
MyDriver driver = new MyDriver() ( OR MyDriver.getInstance() );
DriverManager.registerDriver(driver);
Not recommended over Class.forName("MyDriver") if they do the same thing?
Santosh Kimothi,
Java programmer
santosh kimothi wrote:Class.forName("class name");
is generlly used to load a class specified.
and then internally this method call the method a static block of specified class as follows -
DriverManager.registerDriver(new Driver());
then it creates object of the specified Driver.
No, it doesn'tFei Wong wrote:May I know does loads the driver class means import the driver class using import statement?
Hey, I'm supposed to be the guide! Wait up! No fair! You have the tiny ad!
Smokeless wood heat with a rocket mass heater
https://woodheat.net
|