I am created a database class to understand singleton class better and well as learning java.However i am getting an unreported exception that i can't seem to fix.
Call
private Connection con = ConnectionManager.getConnection();
Netbeans tell me that i have an unreported exception here but here is the getConnection Method
public static Connection getConnection() throws SQLException {
boolean read = ReadFromConfig();
if (read == true) {
try {
con = DriverManager.getConnection(urlstring, user, pass);
} catch (SQLException ex) {
throw new SQLException("Connection failed: " + ex);
}
}
return con;
}