Code Report

I've created an interactive flowchart depicting your Java pattern code! The flowchart shows:

  • Purple nodes: Variable initialization and increments
  • Pink node: Outer loop control
  • Orange diamond nodes: Conditional checks
  • Green nodes: Inner loop starts
  • Cyan nodes: Print operations
  • Red node: End point

The flowchart visualizes:

  • The main method entry and initialization of n = 8
  • The outer loop that iterates through rows (i < n)
  • The first inner loop that prints spaces (decrements j)
  • The second inner loop that prints stars (increments j)
  • Printing a newline after each row
  • Loop back arrows showing the iterative nature

You can zoom, pan, and drag nodes around to explore the flow. The animated edges show the direction of execution!

Code
public class Patterns{
 public static void main(String[] args){
   int n = 8;
   // outer loop handles rows
   for (int i = 0; i < n; i++) {
   // inner loop to print spaces.
     for (int j = n - i; j > 1; j--) {
       System.out.print(' ');
   }
   // inner loop to print stars.
     for (int j = 0; j <= i; j++) {
       System.out.print('* ');
   }
   // printing new line for each row
   System.out.println();
     }
   }
}

Analysed 200+ lines of code

Claude Sonnet 4.5