☀️ 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 Angle Triangle Star Pattern Program in Java  


Program:
*
* *
* * *
* * * *
* * * * *
  • Below is the program:
    public class StarPattern1
    {
        public static void main(String[] args)
        {
            // Outer loop for number of rows
            for (int i=1; i<=5; i++)
            {
                // Inner loop for number of stars in each row
                for (int j=1; j<=i; j++)
                {
                    System.out.print("*");
                }
                // Move to the next line after printing stars in each row
                System.out.println();
            }
        }
    }