title: Java Error: cannot resolve method split()
body: <p>I am trying to get user input into a String array and wanted to use the <code>string.split()</code> method but for some reason, my IntelliJ is telling me, that it cannot resolve the method 'split()'. </p>
  
  <pre class="lang-java prettyprint-override"><code>package com.Practice;
  import java.util.Scanner;
  
  public class Main {
  
      public static void main(String[] args) {
          Scanner sc = new Scanner(System.in);
          String input = sc.nextLine();
  
          String[] splittedString = input.split();
      }
  }
  </code></pre>
  
  <p>I dont think, that there is a problem with my code, mayby with my IDE or Java version, but im no expert at this stuff.
  When I try to run the program it throws me this error:</p>
  
  <pre><code>Error:(10, 40) java: no suitable method found for split(no arguments)
      method java.lang.String.split(java.lang.String,int) is not applicable
        (actual and formal argument lists differ in length)
      method java.lang.String.split(java.lang.String) is not applicable
        (actual and formal argument lists differ in length)
  </code></pre>