title: Trying to show info from database into terminal
body: <p>I'm trying to display a list of the names of people in the database from the terminal, but not sure about how I would go about this. Right now I'm using a prepared statement</p>
  
  <pre><code>public static void showNames() throws SQLException {
          Statement stmt=null;
          Connection conn=null;
          try {
              conn = DriverManager.getConnection(DB_URL, USER, PASS);
              stmt = conn.createStatement();
          } catch (SQLException e) {
              e.printStackTrace();
          }
          String selectTable="SELECT * FROM userInfo;";
          stmt.execute(selectTable);
      }
  </code></pre>