title: Accessing Method that is not included in Constructor
body: <p>I have a class that I created to connect to a database and do various inserts, delete, alter etc...</p>
  
  <p>An array is included to show all. In the database an ID is created automatically so I do not input it, but I would still like the array to output the ID from each column. The code I have is seen below and if I insert cID before cJourneys etc.I get the constructor is undefined. Looking to figure out how to access the ID from the database to call it each time with the array..</p>
  
  <pre><code>public Car(String cLicenseIn, int cJourneysIn, String cUsernameIn, String cPasswordIn) {
      cLicense = cLicenseIn;
      cJourneys = cJourneysIn;
      cUsername = cUsernameIn;
      cPassword = cPasswordIn;
  </code></pre>
  
  <p>}</p>
  
  <pre><code>// Display all Vehicles
  public ArrayList&lt;Car&gt; getAllCar() {
      ArrayList&lt;Car&gt; AllCar = new ArrayList&lt;Car&gt;();
      try {
          Class.forName("com.mysql.jdbc.Driver");
          Connection conn = DriverManager.getConnection(url + dbName, userName, password);
          statement = conn.createStatement();
          resultSet = statement.executeQuery("select * from eflow.Registration");
  
          while (resultSet.next()) {
              Car nextCar = new Car(resultSet.getString("cLicense"), resultSet.getInt("cJourneys"),
                      resultSet.getString("cUsername"), resultSet.getString("cPassword").toString());
              AllCar.add(nextCar);
          }
          conn.close();
      } catch (Exception e) {
          e.printStackTrace();
      }
      return AllCar;
  }
  </code></pre>