title: Using JDBC for a basic login system
body: <p>I'm trying to create a project in java that registers and "Logs in" a user, however I have gotten the Registration part working correctly, I'm not sure how to go about returning the true/false for this. I have the query that needs to be used</p>
  
  <pre><code>public String login(String username, String password) {
      return "SELECT * WHERE Username=\""+username+"\" and Password=\""+password+"\";";
  }
  </code></pre>
  
  <p>although, I'm just not sure what I'm doing, exactly. Any help?</p>
  
  <p>I know how to write to the database, just not how to read from it.</p>