title: Count the words of an array in java
body: <p>I have a list of words e.g : "Moon","Sun","Jupiter","Mars" they are all stored in an array, lets call it "planets"</p>
  
  <pre><code>String[] planets = new String[]{"Moon","Sun","Jupiter","Mars"}
  </code></pre>
  
  <p>How do i get the number of words that are stored in the array ?</p>