title: Java calling from a class getValue
body: <p>Alright so I'm trying to create a method called: setIncrement().  I have two classes I am using, FourDigit, which contains two TwoDigit objects that I have made.  I've called each one segment1 and segment2.  Their relationship is: segment1.segment2.  This method will increment segment2 and when it resets to zero, the method will increment segment1.</p>
  
  <p>The problem is within this piece of code:</p>
  
  <pre><code> public void setIncrement(){
      segment2.incrementValue();
      if(segment2.getValue == 0){
          segment1.value = segment1.value +1;
      }else{
          segment2=aNum%tooHighB;
      }
      getDisplayString();
  }
  </code></pre>
  
  <p>It says: cannot find symbol variable: getValue() ???</p>
  
  <p>Here are the classes: </p>
  
  <p>FourDigits class:</p>
  
  <pre><code>public class FourDigits
  {
  /**
   * Fields
   */
  private Digits segment1;
  private Digits segment2;
  private String displayString;
  
  /**
   * Constructor for objects of class FourDigits
   */
  public FourDigits(int anyHigha, int anyHighb)
  {
      segment1 = new Digits(anyHigha);
      segment2 = new Digits(anyHighb);
  }
  
  /**
   * Mutator method to set values
   */
  public void setValues(int anyNuma, int anyNumb){
      segment1.setValue(anyNuma);
      segment2.setValue(anyNumb);
  }
  /**
   * Mutator method to set the increments
   */
  public void setIncrement(){
      segment2.incrementValue();
      if(segment2.getValue == 0){
          segment1.value = segment1.value +1;
      }else{
          segment2=aNum%tooHighB;
      }
      getDisplayString();
  }
  /**
   * Mutator method to getDisplayString
   */
  public void getDisplayString(){
      System.out.println(segment1.displayString() ="." + segment2.displayString());
  }
  }
  </code></pre>
  
  <p>Which is taking methods from the Digits class:</p>
  
  <pre><code>public class Digits
  {
  /**
  * Fields
  */
  private int value;
  private int tooHigh;
  private String displayString;
  
  /**
  * Constructors
  */
  public Digits(int anyNum)
  {
      value = 0;
      tooHigh=anyNum;
      displayString = "";
  }
  /**
  * Mutator method to set the value
  */
  public void setValue(int anyValue){
      if((anyValue &lt; tooHigh) &amp;&amp; (anyValue &gt;= 0)){
          value = anyValue;
      }else{
          value=0;
      }
  }
  /**
   * Mutator method to add to the value
   */
  public void addValue(){
      if(value &lt; tooHigh){
          value=value+1;
      }else{
          value=tooHigh;
      }
  }
  /**
   * Mutator method to increment the value
   */
    public void incrementValue(){
      int incrementValue;
      incrementValue = value + 1;
      value = incrementValue % tooHigh;
  }
  /**
   * Mutator method to display the string
   */
  public void displayString(){
      if(value&lt;10){
          displayString="0" + value;
      }else{
          displayString="" + value;
      }
      System.out.println(displayString);
  }
  public int getValue(){
      return value;
  }
  
  }
  </code></pre>