@@ -0,0 +1,1607 @@
+package org.corruptor;%0A%0A/******************************************************************************%0A* Filename    : MyConnection.java%0A* Author      : Ali%0A* Date        : %0A* Description : Establishes the database connection.%0A******************************************************************************/%0A%0A%0Aimport java.sql.Connection;%0Aimport java.sql.DriverManager;%0Aimport java.sql.SQLException;%0A%0A%0Apublic class MyConnection %7B%0A%0A    Connection con;%0A   // private String user=%22infy%22;%0A    //private String pass=%22infy2014%22;%0A    private String user=%22root%22;%0A    private String pass=%22%22;%0A%0A    MyConnection() %7B%0A    %7D%0A%0A    public Connection getConnection() %7B%0A%0A        try %7B%0A       %0A        %09%0A        %09%0A           Class.forName(%22com.mysql.jdbc.Driver%22);%0A          con = DriverManager.getConnection(%22jdbc:mysql://localhost/carrental?user=%22+user+%22&password=%22+pass);%0A%0A        %7D catch (ClassNotFoundException e) %7B%0A            e.printStackTrace();%0A            System.out.println(e.getMessage());%0A        %7D catch (SQLException e) %7B%0A            e.printStackTrace();%0A            System.out.println(e.getMessage());%0A        %7D%0A        return con;%0A    %7D%0A%0A    public void closeConnection(Connection con) %7B%0A        if (con != null) %7B%0A            try %7B%0A                con.close();%0A            %7D catch (SQLException e) %7B%0A                e.printStackTrace();%0A                System.out.println(e.getMessage());%0A            %7D%0A        %7D%0A    %7D%0A%7D%0A%0A/******************************************************************************%0A* End of MyConnection.java%0A******************************************************************************/%0A

Create MyConnection.java