How do i do this output in JAVA ??

09/26/2011 07:30 zepolzirk#1
How do i do this kind of program in java?

Enter a Number: 5

*
**
***
****
*****
****
***
**
*
Process Completed.
09/26/2011 08:33 Kinu#2
There is a coding section for this ;)

[Only registered and activated users can see links. Click Here To Register...]
09/26/2011 10:05 vwap#3
System.out.printf("*");
09/26/2011 22:35 XxharCs#4
Maybe something like this :O
Code:
public class Stars{ 
	char star = '*'; 
	char[][]st; 

	public Stars(int cnl1) { 
		st = new char [cn1][cn1]; 
	       for (int i=0; i < cnl1;i++) 
	    	   for (int j = 0; j <cn 1;j++) 
	    		   st [i][j] =star ;
	} 
          

	void starsShow() { 
	     for (int i=0; i < st.length;i++) 
	    	 for (int j = 0; j < st.length;j++){ 
	    		 System.out.print(st[i][j]);
	    		 if(j==st.length-1)
		    		 System.out.println("");
	    	 }
	} 
}
Not sure if you will get something like this(1 year has past when i done such programms in school, so i am not sure^^):
*
**
***
****
*****
****
***
**
*
09/27/2011 01:52 SmackJew#5
Code:
void stars(int n)
{
    String st = new String();
    for(int i = 0; i < n; i++)
    {
        System.out.println(st+="*");
    }
    for(int i = 1; i < n; i++)
    {
        System.out.println(st.substring(i, n));
    }
}
09/27/2011 11:19 link#6
Code:
public class Test
{
    public static void main(String[] args)
    {
        System.out.println(">");
        System.out.println(Lines(9));
        System.out.println("-");
        System.out.println(Amount(5));
        System.out.println("<");
    }

    public static String Lines(int lines)
    {
        String str = new String();
        lines |= 1;
        for (int i = 0; i < lines; i++)
        {
            if (i > 0)
            {
                str += "\n";
            }
            for (int j = 0; j < ((i > lines / 2) ? lines - i : i + 1); j++)
            {
                str += "*";
            }
        }
        return str;
    }

    public static String Amount(int amount)
    {
        return Lines((amount & ~1) * 2 + 1);
    }
}