title: Jsoup imdb rating
body: <p>I wrote a program which reads the name and the rating of the top 250 movies on imdb and return the mean of the rating. I have the follow program</p>
  
  <pre><code>import java.io.IOException;
  
  import org.jsoup.*;
  import org.jsoup.nodes.Document;
  import org.jsoup.nodes.Element;
  import org.jsoup.select.Elements;
  public class da {
  
  /**
   * @param args
   */
  public static void main(String[] args) {
      try {
  
  
              Document doc=Jsoup.connect("http://www.imdb.com/chart/top").get();
              Elements e=doc.getElementsByClass("titleColumn");
              Elements t=doc.getElementsByClass("imdbRating");
              float suma=0;
          for(int i=0;i&lt;e.size();i++)
              suma=suma+Float.parseFloat(t.get(i).text());
  
      System.out.println(suma/250);
  
  
      } catch (IOException e) {
          // TODO Auto-generated catch block
          e.printStackTrace();
      }
  
  
  }
  
  }
  </code></pre>
  
  <p>My question is why in 't' it needs "imdbRating" because if i look in the html on the page i see that where rating is located it writes "ratingColumn imdbRating" (i did this program by mistake and i don't know why it is working this way and not the other way)</p>