why is my math wrong in Java?
<p>In the following code, I see no way in which T1 and T3 are different.  Certainly my calculator says they are not.</p>

<pre><code>public class longTest {
    public static final long T1 = 24 * 60 * 60 * 1000 * 30;
    public static final long T2 = 24 * 60 * 60 * 1000;
    public static final long T3 = T2 * 30;

    public static void main(String[] args) {

        System.out.println(T1);
        System.out.println(T2);
        System.out.println(T3);
    }
}
</code></pre>

<p>So why do I get output of:</p>

<pre><code>-1702967296
86400000
2592000000
</code></pre>

<p>It's not just System.out.println in this sample program either.  When I have T1 in eclipse and  mouse over the variable I get a gloss showing the same values.</p>

<blockquote>
  <p>java version "1.6.0_33" OSX</p>
</blockquote>
