0% found this document useful (0 votes)
2 views2 pages

Java Code Samples for Patterns

The document outlines various patterns and techniques for generating patterns in Java programming. It includes instructions for creating Pascal numbers, mirror patterns, and hollow patterns using loops and conditional statements. The focus is on controlling the flow of loops with specific conditions to achieve desired outputs.

Uploaded by

Stephy Bless
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views2 pages

Java Code Samples for Patterns

The document outlines various patterns and techniques for generating patterns in Java programming. It includes instructions for creating Pascal numbers, mirror patterns, and hollow patterns using loops and conditional statements. The focus is on controlling the flow of loops with specific conditions to achieve desired outputs.

Uploaded by

Stephy Bless
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

GET READY WITH JAVA

PATTERNS:

j = 1 to n j = 1 to i j = n to i j = 1 to 2*(n-i) j=1 to
i
j=1 to i
j=i to n

j = 1 to (n-i) j = 1 to i
j = 1 to i j = i to n

PASCAL NUMBERS - num = 1 , num = num * (i


–j)/j
MIRRORS  num = 1, num ++ ; num = num – 2,
n-- ;
HOLLOW  if-else conditions (ex: j==n, j==1,
j==i)

You might also like