title: method to determine if age square is == to current year
body: <p>I am trying to write a method that determines if the square of the age of a person is equal to the current year. For example a man was aged 43 in 1849 and the square of 43 is 1849. Below is my code for it but I dont know why my exception is not working because it is assumed that no body can live past 123 years</p>
  
  <pre><code> public class Augustus 
   {
      private int year;
      private final static  int RANGEOFLIVING=124;
  
      public static void main(String[] args) 
      {
         Augustus y = new Augustus(1806); 
         System.out.println(y.isAlive());
      }
  
      public Augustus(int n)
      {
          year= n;
      }
  
      public int SquareOfAge(int z)
      {
         return z * z ;
      }
  
     public boolean isAlive()
     {
         for(int i=1;i&lt;RANGEOFLIVING;i++)
           if (SquareOfAge(i)!=year++)
                 return false;
            return true;
  
  
     }
  }
  </code></pre>