title: Messed up checks?
body: <p>Just a brief description of what I am doing - I have random equation generator and buttons with all the digits. In order to answer the question the user has to click the corresponding buttons to form the question(digits are written from left to right) e.g. 9 + 6 = <em>user clicks 1 and 5</em>. If the answer is correct another equation should come up. The issue I am encountering for now is that SOMETIMES when the answer is a single digit there is no new equation showing up, nor any errors or something. Just nothing happens. Most of the time this occurs is when the answer is "0". Any idea what might be causing this ? Here is part of the code :</p>
  
  <pre><code>public void checkAnswer(){      
      int answer = question.getAnswer();      
          if(ansID2==-1){
              if(String.valueOf(answer).equals(String.valueOf(ansID1))){
                  makeEquation();
              }
          }else{
              if(String.valueOf(answer).equals(String.valueOf(ansID1) + String.valueOf(ansID2))){
                  makeEquation();
              }
          }
  }
  </code></pre>
  
  <p><code>ansID2</code> is set to be <code>-1</code> so if the answer is only a single digit the second digit place is skipped. <code>ansID</code>'s are assigned when the button with the digit is clicked.</p>
  
  <p><code>checkAnswer</code> is called from a button "Check Answer" with the following code </p>
  
  <pre><code>EventHandler checkHandler = new EventHandler(){     
          @Override
          public void handle(Event arg0) {
              checkAnswer();          
          }
      }; 
  </code></pre>
  
  <p><code>ansID2</code> is set to -1 in the field declaration</p>