title: Java array list returning 0 value
body: <p>I have created a class like this, which contains a bunch of arraylist as you can see. I've been setting the array with the methods add.. and then retrieving it with get.., when i tried to System.out.println numberofcitizen for example it is returning 0. Note that i have instantiated the class in another class to set the values. </p>
  
  <pre><code>public int numberOfCitizen;
  
  private final ArrayList&lt;Integer&gt; citizenid = new ArrayList&lt;&gt;();
  private final ArrayList&lt;String&gt; citizenName = new ArrayList&lt;&gt;();
  private final ArrayList&lt;Integer&gt; citizenWaste = new ArrayList&lt;&gt;();
  private final ArrayList&lt;Float&gt; longitude = new ArrayList&lt;&gt;();
  private final ArrayList&lt;Float&gt; latitude = new ArrayList&lt;&gt;();
  private final ArrayList&lt;String&gt; address = new ArrayList&lt;&gt;();
  
  public void working() {
      System.out.println("executing fine");
  }
  
  public void setnoOfcit(int number) {
      this.numberOfCitizen = number;
  
  }
  
  public int getnumber() {
      return this.numberOfCitizen;
  }
  
  public void addCitizenId(int citizen) {
      citizenid.add(citizen);
  }
  
  public int getCitizenid(int i) {
      int citId = citizenid.get(i);
      return citId;
  }
  
  public void addCitizenName(String citizenname) {
      citizenName.add(citizenname);
  }
  
  public String getCitizenName(int i) {
      return citizenName.get(i);
  }
  
  public void addCitizenWaste(int waste) {
      citizenWaste.add(waste);
  }
  
  public int getCitizenWaste(int i) {
      return citizenWaste.get(i);
  }
  
  public void addLatitude(float lat) {
      latitude.add(lat);
  }
  
  public float getLat(int i) {
      return latitude.get(i);
  }
  
  public void addlng(float lng) {
      longitude.add(lng);
  }
  
  public float getlng(int i) {
      return longitude.get(i);
  }
  
  com.graphhopper.jsprit.core.problem.VehicleRoutingProblem.Builder vrpBuilder = com.graphhopper.jsprit.core.problem.VehicleRoutingProblem.Builder.newInstance();
  
  public void runVPRSolver() {
      System.out.println(numberOfCitizen);
      System.out.println(getCitizenName(0));
      //create a loop to fill parameters 
  </code></pre>