☀️ SUMMER SALE
🚀 Master Java → Build Real Projects → Crack Interviews → Get Hired
🚀 Crack Product/Service Based Company Interviews
from our Java Placement Courses
🔥 30% OFF Coupon: SUMMER30 Coupon: SUMMER30 View Courses
✓ Coupon Copied: SUMMER30

Right Angled Triangle Pattern Program in Java  


Program:
    *
   * *
  * * *
 * * * *
* * * * *
  • Below is the program:
    public class StarPattern7
    {
        public static void main(String[] args)
        {
            for (int i=1; i<=5; i++)
            {
                for(int j=4; j>=i; j--)
                {
                    System.out.print(" ");
                }
                for (int k=1; k<=i; k++)
                {
                    System.out.print("* ");
                }
                System.out.println();
            }
        }
    }