title: Symbol not found : string.size() Java Syntax Error
body: <pre><code>  String[] words = text.split("\\s+");
    for(int j = 0; j &lt; words.size(); j++) {
         System.out.println(j)
     }
  </code></pre>
  
  <p>I am getting an error in the above for loop: </p>
  
  <p>HelloWorld.java:18: error: cannot find symbol
          for(int j = 0; j &lt; words.size(); j++) {
                                  ^
    symbol:   method size()
    location: variable words of type String[]
  1 error</p>
  
  <p>Not sure what is wrong syntatically?</p>