text: Java program for Pascal ' s ▁ Triangle ▁ A ▁ O ( n ^ 2 ) ▁ time ▁ and ▁ O ( 1 ) ▁ extra ▁ space ▁ method ▁ for ▁ Pascal ' s Triangle
code: import java . io . * ; class GFG { public static void printPascal ( int n ) { for ( int line = 1 ; line <= n ; line ++ ) {