Program to display the lower triangular matrix

Source Code:

public class LowerTriangular {
public static void main(String[] args) {
int[][] a = {
{1, 2, 3},
{4, 5, 6},
{7, 8, 9}
};
for(int i=0; i<3; i++) {
for(int j=0; j i) {
System.out.print(“0 “);
} else {
System.out.print(a[i][j] + ” “);
}
}
System.out.println();
}
}
}

Output: