

Hi,
Here is the answer of the question.
Class.forName() loads and returns the class object for the given class name.we load the driver class by calling Class.forName() with the Driver class name as an argument.
Class.forName() method used to dynamically load the driver's class file into memory.This method is preferable because it allows you to make the driver registration configurable and portable.
try {
Class.forName("oracle.jdbc.driver.OracleDriver");
}
catch(ClassNotFoundException ex) {
System.out.println("Error: unable to load driver class!");
System.exit(0);
}
If you are facing any programming issue, such as compilation errors or not able to find the code you are looking for.
Ask your questions, our development team will try to give answers to your questions.