Print Star Pattern in Java

Print Star Pattern in Java

Hi, today will show you how to write the programmer. Print Star Pattern in Java

Print Star Pattern in Java


public class StarDemo
{

 public static void main(String[] args)
{
 for(int i = 0; i < 10; i++)
 {
 for(int j=i+1;j>0;j--)
 {
 System.out.print("*");
 }
 System.out.println();
  }
 }
}

Print Star Pattern in Java

*
**
***
****
*****
******
*******
********
*********
**********

Share this

Related Posts

Previous
Next Post »