For this Question: Implement the function <code>floor</code>, which should take a number which can be a float(decimal)
and return its result as an integer with floor function applied to it (Use JS In built functions)Function will take a float as inputFunction will return a numberconsole.log(floor(1.99)) // prints 1

console.log(floor(2.1)) // prints 2

console.log(floor(-0.8)) // prints -1, 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);
        float a = sc.nextFloat();

        System.out.print((int)Math.floor(a));
    }
}, In this Programming Language: Java, Now tell me if this Code is compilable or not?