title: New to java, don't understand the program
body: <p>I had to do an assignment which had the question, "Mexico's population is 62 million and is growing at the annual rate of 7%. The United States' current population is 280 million and is growing at the annual rate of 2%. If these two countries were to maintain their current rates of growth, in how many years will Mexico's population be more than half that of the United States? Your program
  should answer this question."
  So I created the basic layout, but had problems with the multiplication of the population. Finally, I found the program online and it works, but I still do not understand why do we multiply "usa" with "1.02" and "mexico" with "1.07". I know it probably is some formula, but could you guys tell me what it is?</p>
  
  <pre><code>double mexico = 62000000;
  double usa = 280000000;
  double years = 0;   
  while (mexico &lt;= usa/2)
  {
      years++;
      mexico *= 1.07;
      usa *= 1.02;        
  }
  System.out.println(" Mexico's population will surpass half of USA' s population in " 
      + years + " years!");
  </code></pre>