Ackermann function
<p>I am writing a recursive program which calculates the <a href="http://en.wikipedia.org/wiki/Ackermann_function" rel="nofollow">Ackermann function</a>.</p>

<p>Here is the code:</p>

<pre><code>public class Ackermann{

    public static long ackermann( long m,long n) {
        return
            (m==0)? n+1:
            (m&gt;0 &amp;&amp; n==0)? ackermann(m-1,1):
            (m&gt;0 &amp;&amp; n&gt;0)? ackermann(m-1, ackermann(m,n-1));
    }


    public static void main(String[]args) {
        long m=4;
        long n=2;
        System.out.println(ackermann(m,n));
    }
}
</code></pre>

<p>But it shows me mistakes:</p>

<pre><code>Ackermann.java:7: : expected
   (m&gt;0 &amp;&amp; n&gt;0)? ackermann(m-1, ackermann(m,n-1));
                                                 ^
Ackermann.java:7: ';' expected
   (m&gt;0 &amp;&amp; n&gt;0)? ackermann(m-1, ackermann(m,n-1));
                                                  ^
Ackermann.java:18: illegal start of expression
public static void main(String[]args){
^
Ackermann.java:18: ';' expected
public static void main(String[]args){
      ^
Ackermann.java:18: illegal start of expression
public static void main(String[]args){
              ^
Ackermann.java:18: ';' expected
public static void main(String[]args){
                       ^
Ackermann.java:18: ';' expected
public static void main(String[]args){
                                    ^
Ackermann.java:26: reached end of file while parsing
}
 ^
8 errors
</code></pre>

<p>How can this be fixed?</p>
