title: How to check if a string is a valid integer?
body: <p>I have:</p>
  
  <pre><code> op1 = Integer.parseInt(jTextField1.getText());
   op2 = Integer.parseInt(jTextField2.getText());
  </code></pre>
  
  <p>However, I want to check first whether the text fields' values can be assigned to integer variables. How do I do that?</p>
  
  <p>I've been going through this for a long time, so, if this was already asked here, forgive me</p>