Test Your Java Skills

This section will contain various challenges in making different patterns. If you know for and while loops , then you should be able to solve these
Pat 1. WAP to generate five different patterns. The pattern depend on input number chosen. The input should be numeric and output should be a starred 
pattern. To say :
Output should be ::: 
Enter a number (2-6 ) : 2
Output : 
            ***
	     *
	    ***

-------------------
Enter a number (2 - 6): 4 
Output: 
           *****
	    ***
	   *****

Solution