For this Question: Given an integer n, your task is to print a right-angle triangle pattern of consecutive numbers of height n.<b>User Task:</b>
Take only one user input <b>n</b> the height of right angle triangle.
Constraint:
1 &le; n &le;100

Print a right angle triangle of numbers of height n.Sample Input:
5

Sample Output:
1
1 2 
1 2 3
1 2 3 4
1 2 3 4 5

Sample Input:
2

Sample Output:
1
1 2, I have written this Solution Code: import java.util.Scanner;

public class Main {

    public static void main(String[] args) {
        Scanner input = new Scanner(System.in);
        
        int n = input.nextInt();
        int num = 1;
        for (int i = 1; i <= n; i++) {
            for (int j = 1; j <= i; j++) {
                System.out.print(num + " ");
                num++;
            } 
            num=1;
            System.out.println();
        }
    }
}
, In this Programming Language: Java, Now tell me if this Code is compilable or not?