For this Question: Given an integer N. You need to print the squares of all numbers from 1 to N in different lines.The only input line contains an integer N.

Constraints:
1 <= N <= 1000Print N lines where the ith line (1-based indexing) contains an integer i<sup>2</sup>.Sample Input 1:
4

Output:
1
4
9
16

Explanation:
1*1 = 1
2*2 = 4
3*3 = 9
4*4 = 16

Sample Input 2:
2

Output:
1
4

Explanation:
1*1 = 1
2*2 = 4, I have written this Solution Code: import java.io.*;
import java.util.Scanner;

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