Print Star Pattern in Java
In java programming you can easily
print star pattern in java. For this code you need to follow same concept which is used in java only change syntax of C language into Java.
Pattern
*
**
***
****
*****
******
*******
********
*********
**********
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();
}
}
}
Pattern
********
*******
******
*****
****
***
**
*
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();
}
}
}
Really nice blog post.provided a helpful information.I hope that you will post more updates like this AngularJS Online Course Hyderabad
ReplyDelete