Change For loop to Recursion
<p>I was asked to Write a recursive method that takes as a parameter a nonnegative integer and generates the following pattern of stars. 
    If the nonnegative integer is 4, then the pattern generated is:</p>

<pre><code>****
***
**
*
**
***
****
</code></pre>

<p>Also, write a program that prompts the user to enter the number of lines in the pattern and uses the recursive method to generate the pattern. 
For example, specifying 4 as the number of lines generates the above pattern.
 */</p>

<p>My code: However, recursion is not working any ideas? or suggestions? </p>

<pre><code>    public static void printStars(int lines) {
        if (lines==1) {
            System.out.print("*");
        } else {
            System.out.print("*");
            printStars(lines-1);
            System.out.println();

        }
    }
}
</code></pre>