This repository contains a simple Java program for printing stars dynamically. The StarPrinter
class provides a method to print stars in a pattern that increases with each iteration.
To use the StarPrinter
class, follow these steps:
-
Clone the repository to your local machine:
git clone https://github.com/yourusername/dynamic-star-printer.git
-
Navigate to the project directory:
cd dynamic-star-printer
-
Compile the Java files:
javac StarPrinter.java
-
Run the program:
java StarPrinter
-
Follow the on-screen instructions to specify the number of times stars should be printed.
StarPrinter starPrinter = new StarPrinter();
starPrinter.printStars(4);
Output:
*
***
**
****
***
*****
****
******