Code example for Properties

Methods: put

0
      return getConnection(this.userName, this.password);
   } 
 
   public Connection getConnection(String username, String password) throws SQLException
   { 
      Properties props = new Properties();
      if (username != null)
      { 
         props.put("user", username);
      } 
      if (password != null)
      { 
         props.put("password", password);
      } 
      Connection conn = driver.connect(this.jdbcUrl, props);
      return conn;
   } 
 
   public PrintWriter getLogWriter() throws SQLException
   { 
Experience pair programming with AI  Get Codota for Java