For this Question: Given a positive integer number N. The task is to generate all the positive binary numbers of N digits. These binary numbers should be in ascending order.The first line contains integer N - the number of digits in binary string

Constraints:
1 <= N <= 20Print all the positive binary numbers of N digits.Sample input 1:
1

Output:
1

Sample input 2:
2

Output:
10
11

Explanation:
2 can be written as 10 in binary 
3 can be written as 11 in binary, I have written this Solution Code: import java.io.*;
import java.util.*;



class Main {
    public static void main (String[] args) {

        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        for (int i = (1 << (n - 1)); i < (1 << n); i++) {
         System.out.println(Integer.toBinaryString(i));
    }
}
}, In this Programming Language: Java, Now tell me if this Code is compilable or not?