title: Increment an "ID" count without a object with a starting value (java)
body: <p>Everytime I run this program to create a new object it is supposed to start at 1000 and each time it is created increment by one. How do I increment the count of this independant of the count of the array. </p>
  
  <p>Right now each time i run the program it outputs an Id of 1000 for each </p>
  
  <p>Please be as simple as possible I don't understand java that well. thanks </p>
  
  <p>Main program</p>
  
  <pre><code>import javax.swing.JOptionPane;
  
   public class useConcert {
  
   private static Concert[] concert = new Concert[100];
     private static int numConcert = 0;
  
   public static void main (String[] args){
    String userInput  = "";
    boolean testResult; 
  
    do {
  
          userInput = mainMenu();
  
          if (userInput.equals("1")) {
         do{
            String artist = getStringInput("Artist or Group name?");
            int month = getIntegerInput("Enter month in XX format ");
            int day = getIntegerInput("Enter day in XX format ");
            int year = getIntegerInput("Enter year in XXXX format");
            int ticketCost = getIntegerInput("Enter cost per ticket ($25 - $250)");
            int quantTickets = getIntegerInput("Enter Number of tickets available (Max 10,000)");  
            int concertId = 1000;    
            concert[numConcert++] = new Concert(artist,quantTickets,ticketCost,month,day,year,concertId);
         }while (JOptionPane.showConfirmDialog(null, "Add another concert?")==JOptionPane.YES_OPTION);
          } else if (userInput.equals("2")) {
          listConcert();
          } 
      } while (!userInput.equals("0"));
  
  
    public static String concertList(){
       String outputString = "";
       for (int idx =0;  idx &lt; numConcert; idx++){
          outputString += concert[idx].shortString() + "\n";
       }
       return outputString;
     }  
  
     public static void listConcert() {
       EZJ.dialog(concertList());
     }
    }
  </code></pre>
  
  <p>Class</p>
  
  <pre><code>public class Concert {
   private String artist = "";
   private int quantTickets = 0;
   private int ticketCost = 0;
   private int month = 0;
   private int day = 0;
   private int year = 0;
   private int numConcert = 0;
   private int concertId = 1000;
  
   public Concert(String artist, int quantTickets, int ticketCost, int month, int day, int year, int concertId){
    this.artist = artist;
    this.quantTickets = quantTickets;
    this.ticketCost = ticketCost;
    this.month = month;
    this.day = day;
    this.year = year;
    this.concertId = concertId;
   } 
  
   public void setConcertId (int concertId){
         concertId++;
       this.concertId = concertId;
      }
  
  public String shortString(){
      return " " + artist + " " + getConcertId();
  }
  </code></pre>