title: Given a string of even length, return the first half. So the string "WooHoo" yields "Woo"
body: <p>This is what I have so far:</p>
  
  <pre><code>    Scanner scan = new Scanner(System.in);
  
      String str = scan.nextLine();
  
      int x = str.length();
      int y = str.charAt(x/2);
      System.out.println(str.substring(y, x-1));
  </code></pre>
  
  <p>For some reason when I run this it's giving me an error.
  Please HELP!</p>
  
  <p>I'm still a beginner in this, and I only know how to use the basics in Java.
  I don't know how to use arrays and other advanced stuff.
  If someone can tell me how to solve this problem in the simplest way possible that would be great!</p>
  
  <p>Thanks in advance! :)</p>