For this Question: You are given a function <code>reverseString</code>, which takes in a string as a parameter. Your task is to complete the function such that it returns the reverse of the string.(hello changes to olleh)

// Complete the reverseString function 

function reverseString(n) {
//Write Code Here
}A string nReturns the reverse of nconst n = 'hello'

reverseString(n) //displays 'olleh' in console, 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 n=sc.nextLine();



            char tra[] = n.toCharArray();


        for(int i=tra.length-1;i>=0;i--){
            System.out.print(tra[i]);
        }
    }
}, In this Programming Language: Java, Now tell me if this Code is compilable or not?