Q2. What is the importance of pattern printing in Java?
Patterns help us to know looping structures in general purpose programming language. It is asked in job interviews and campus placements.