title: getting decimals when diving doubles
body: <p>I wrote this method to find the avarage lenght of tokens in a string. I'm having a hard time getting the decimas from this division (two doubles).</p>
  
  <pre><code>public static double averageTokenLength (Scanner s)
  {
      String word="";
      int words = 0;
      int length = 0;
      double average = 0;
  
  while (s.hasNext())
  {
      word = s.next();
      words++;
      length = length + word.length();    
      average = (length/ words);
  
  }
  
  return average;
  </code></pre>
  
  <p>The test method I was given by the professor shows "expected; 3.66666666666667, but was 3.0. How can i get my code to show that result?</p>