How do I get my if statement to search for delimiters?
<p>iv'e been searching around but it's hard to find an answer for this specific code. I'm looking to make my if statement search for the delimiter - then use the apply the integers before and after to a variable. E.G. if they inputted 1-50 it would apply 1 to int a and 50 to int b. Here's the if statement i'm looking to apply it to. It would come from the input variable :  </p>

<pre><code>   if (yes.equalsIgnoreCase("no")){
       if (a.equalsIgnoreCase(answer) &amp;&amp; input.equalsIgnoreCase("instant")){
           Thread.sleep(1);
       }
       else if (a.equalsIgnoreCase(answer) &amp;&amp; input.equalsIgnoreCase("generate")){
           Thread.sleep(randomInt);
       }
       else if (a.equalsIgnoreCase(answer) &amp;&amp; !input.equalsIgnoreCase("generate") &amp;&amp; !input.equalsIgnoreCase("instant")){
       int x =Integer.parseInt(input);
       x = x*60000;
       Thread.sleep(x);
       }
       else if (a.equals("quit" )){
           System.exit(0);
       }
       else if (a.equals("Quit")){
           System.exit(0);
       }
       else if (a.equals("")){

       }
       else{
              JOptionPane.showMessageDialog(null,"Please check the answer then try again ");
              i = i-2;
           }
</code></pre>

<p>Thanks for any help.</p>
