How to make a Squire in Java with Star

In this program, you'll learn to create and print Squire pattern with star and Floyd's Squire sing control statements in Java.

Sample Input

Enter how row of star do you want : 5

Sample Output

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

You can find many pattern printing exercises in Java programming. You can further refine this program to print any other character instead of " * " or you can ask the user to enter number or rows. You can even modify this program to print pyramid of numbers. Such as:

1 2 3 4 5 6
1         1
1         1
1         1
1         1
6 5 4 3 2 1