I have written a dbconnection.java class and it has a static block where i load the driver class
static
{
try
{
Class.forName(com.mysql.jdbc.Driver);
}
catch(ClassNotFoundException e)
{
e.printStackTrace();
}
}
I know that this static block is written to register the driver. but even when i comment this static block and try to make a database connection it is getting connected.
So i wanted to know What Is The Importance or Significance of writing this static block.