title: Splitting a scanner string
body: <pre><code>import java.io.IOException;
  import java.util.Scanner;
  
  
  public class web_practice {
  
      /**
       * @param args
       * @throws IOException 
       */
      public static void main(String[] args) throws IOException {
          // TODO Auto-generated method stub
  
          Scanner scanner = new Scanner(System.in);
          String input = scanner.next();
  
          int l = input.indexOf(' ');
          String cmd = input.substring(0, l);
          String end = input.substring(l);
  
          if (cmd.equals("define"));
          java.awt.Desktop.getDesktop().browse(java.net.URI.create("http://dictionary.reference.com/browse/" + end));
      }
  }
  </code></pre>
  
  <p>I was trying to make a code to find the definition of a word by connecting it to dictionary.com and checking if they say the word "define" as the first word?</p>
  
  <p>The splitting is not working.</p>