Star method using apex
Star method using apex
*****
****
***
**
*
Answer:
● The outer loop (i) controls the number of rows, starting from 5 down to 1.
● The inner loop (j) adds the stars for each row.
● System.debug(row); prints each row to the debug log (Apex uses debug logs instead
of direct console output).
How to Run:
StarPattern.printStarPattern();