Code example for Connection

Methods: close, isClosed

0
			 
	} 
	 
	public void closeConnection() { 
		try { 
			if(con != null && !con.isClosed()) {
				con.close();
			} 
		}catch(Exception e) {
			e.printStackTrace();
		} 
	} 
	public void setConnection(Connection con) {
		this.con = con;
	} 
	 
	public String getDBHost(){
		try { 
			if(con == null || con.isClosed()){
				return null; 
			}