This repository contains various pattern programs implemented in Java. Each program demonstrates a different way of generating common patterns, such as pyramids, triangles, and other shapes, using nested loops.
Pattern programs are an essential part of learning Java programming, helping to build a strong foundation in loops and logic-building. This repository includes a variety of patterns, from simple shapes like pyramids to complex designs like diamonds and houses.
Below is the list of pattern programs included in this repository:
- Alphabetic Pyramid:
AlphabeticPyramid.java - Butterfly Pattern:
ButterflyPattern.java - Diamond Pattern:
DiamondPattern.java - Floyd's Triangle:
FloydTrianglePattern.java - Half Pyramid:
HalfPyramidPattern.java - Hollow Rectangle:
HollowRectanglePattern.java - House Pattern:
HousePattern.java - Inverted Pyramid:
InvertedPyramidPattern.java - Inverted Rotated Half Pyramid:
InvertedRotatedHalfPyramid.java - Normal Pyramid:
NormalPyramid.java - Rhombus Pattern:
RhombusPattern.java - Star Pattern:
StarPattern.java - Triangle Pattern:
TrianglePattern01.java
-
Clone the repository:
git clone https://github.com/GirishSonune/Java-Loop-Pattern.git cd Java-Loop-Pattern -
Open any
.javafile in your preferred IDE or text editor. -
Compile and run the program:
javac FileName.java java FileName
Replace
FileNamewith the name of the Java file you want to execute. -
Follow the prompts (if any) to see the pattern output.
- Java Development Kit (JDK) installed on your system.
- Basic knowledge of Java programming.
Contributions are welcome! If you have a new pattern or improvement, please follow these steps:
- Fork the repository.
- Create a new branch:
git checkout -b feature-name. - Commit your changes:
git commit -m 'Add feature-name'. - Push to the branch:
git push origin feature-name. - Open a pull request.
This project is licensed under the MIT License. See the LICENSE file for more details.
Happy coding and learning Java patterns!