title: Java error not a statement
body: <p>When I try to compile my code I get the message</p>
  
  <pre><code>Main.java:31: error: not a statement
  String bed = f.split(" ")
  </code></pre>
  
  <p>and also</p>
  
  <pre><code>error: ';' expected
  String bed = f.split(" ");
  </code></pre>
  
  <p>I don't understand what's going on. I need to assign part of a file to a string.</p>
  
  <p>Here's the code :</p>
  
  <pre><code>import java.util.Scanner; 
  import java.io.*;
  
  public class Main{
  
  public static void main(String[] args){
      if ( args[0] == null){
  
          System.out.println("File not Found");
          return;
          }
  
      try {
          File driver = new File (args[0]);
           Scanner j = new Scanner( driver );
           int i = 0;
           while( j.hasNextLine()) {
              String f = j.nextLine();
              if (f.isEmpty() || f.startsWith("/")){   //If the String f is empty or has / it will continue reading the nextline after the / or space
                  continue;
                  if (f.startsWith("d")) {
                  String d = f.split(" ");
  
              }
                  if (f.startsWith("b")) {
                  String b = f.split(" ");
  
                  }
  
                  if (f.startsWith("bed"))
                  String bed = f.split(" ");
              }
  
  
  
              System.out.println(f);
  
           }
  
      }
      catch(FileNotFoundException e) {
  
          System.out.println(e.getMessage());
  
  
  
      }
  
      catch (Exception ex) {
          System.out.println(ex.getMessage);
  
      }
  
  
  
  }
  </code></pre>
  
  <p>}</p>