For this Question: For all non- negative integers i<n, Print square of i.The first line contains the integer n.

Constraints
1<=n<=20Print n lines, one corresponding to each i.Sample Input:
3
Sample Output:
0
1
4

Explanation:
Prints the square of each number less than n on a separate line., 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=0; i<n; i++){
            System.out.println(i*i);
        }
    }
}, In this Programming Language: Java, Now tell me if this Code is compilable or not?