Piecewise equation program
<p>I did this program which is a piecewise equation program and I just want to know if i did anything wrong or if i missed anything. The answers are coming out to be right but just wanted to make sure i didn't miss any coding.</p>

<pre><code>class RecursiveMethods
{
    RecursiveMethods()          //default constructor
    {
    }

    public int fOf(int x)
    {
        if (x &lt;= 10)                        //the base case
        {
            System.out.println(x + " &lt;= 10, therefore ... f(" + x + ") = -5");
            return -5;
        }
        else
        {
            System.out.println(x + " &gt; 10, therefore ... f(" + x + ") = f(" + x + " - 3) + 2 = f(" + (x -3) + ") + 2");
            return fOf(x-3) + 2;
        }
    }    
}

public class RecursionMethodTester
{
    public static void main(String[] args)
    {
        int x;
        RecursiveMethods rMethods = new RecursiveMethods();

        System.out.println("---------------------------------");
        System.out.println("       f(x - 3) + 2    if x &gt;  10");
        System.out.println("f(x) = ");
        System.out.println("       -5              if x &lt;= 10");
        System.out.println("---------------------------------");
        System.out.println();

        x = 20;
        System.out.println("Example 1:  x = " + x);
        System.out.println("f(" + x + ") = " + rMethods.fOf(x));
        System.out.println();

        x = 19;
        System.out.println("Example 2:  x = " + x);
        System.out.println("f(" + x + ") = " + rMethods.fOf(x));
        System.out.println();

        x = 18;
        System.out.println("Example 3:  x = " + x);
        System.out.println("f(" + x + ") = " + rMethods.fOf(x));
        System.out.println();  
    }
}
</code></pre>

<p>Thank you for your support.</p>
