For this Question: Write a class named <code>School</code> and add the following:
1)A Constructor which instantiates an empty student array
2)A method named <code>add</code> to push students to the array
3)A get method named <code>latest</code> which returns the last student added to the listThe input contains only one line i. e list of students separated by whitespaceOutput the latest student enrolled(i. e the last student to join)Input:
galaxy newton john alex

Output:
alex, 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);
    String str = sc.nextLine();
    String splt[] = str.split(" ");
    System.out.println(splt[splt.length-1]);
    }
}, In this Programming Language: Java, Now tell me if this Code is compilable or not?