title: Error when trying to test a mathematical proof
body: <p>So I'm creating a short test just to see if my friend's proof is rightt being that there are no positive integers that, when written twice (i.e. 10->1010) is a perfect square. </p>
  
  <pre><code>package checker;
  
  import static java.lang.Math.*;
  
  public class Checker {
  
      public static void main(String[] args) {
           for(int i=10001; i&lt;1000000; i++) {
              String repeat = i + "" + i;
              int x = Integer.valueOf(repeat);
              double root = Math.sqrt(x);
  
              if (root == Math.floor(root) &amp;&amp; !Double.isInfinite(root)) {
                  System.out.println("When " + i + " is repeated and the root is taken of it, the result, " + x
                  + " IS a perfect square.");
              }
           }
      }
  };  
  </code></pre>
  
  <p>When I run it I get the error:</p>
  
  <pre><code>Exception in thread "main" java.lang.NumberFormatException: For input string: "2147521475"
  at java.lang.NumberFormatException.forInputString(NumberFormatException.java:65)
  at java.lang.Integer.parseInt(Integer.java:583)
  at java.lang.Integer.valueOf(Integer.java:766)
  at checker.Checker.main(Checker.java:11)
  </code></pre>
  
  <p>I'm fairly new to Java so I do not understand a whole lot. Help is appreciated. Thanks.</p>