title: Split function giving incorrect result in java
body: <pre><code>import java.util.*;
  class Solution {
      public static void main(String d[]) {
          
          Scanner sc=new Scanner(System.in);
          
          String s0=sc.next();
          
  
         
      
  
        String p[]=s0.split(&quot; &quot;);
        System.out.println(p.length);
  }
  }    
  </code></pre>
  <p>I am using jdk version 8 and when i am giving input as &quot;hello world java&quot;, it is printing length as 1 ,whereas it should print the length as 3,please help me in resolving this</p>