For this Question: Given the length of the radius of curvature and the type of mirror, calculate its focal length.

<b>Note:</b> '(' represents a convex mirror while ')' represents a concave mirror<b>User Task:</b>
Since this will be a functional problem, you don't have to take input. You just have to complete the function <b>focal_length()</b> that takes the integer R(radius of curvature) and the character Mirror (type of mirror) as parameter

<b>Constraints:-</b>
1 <= R <= 100
Mirror will be either of '('(convex type) or ')'(concave type)Return the <b>floor value of focal length.</b>Sample Input:-
9 (

Sample Output:-
4

Sample Input:-
9 )

Sample Output:-
-5, I have written this Solution Code: static int focal_length(int R, char Mirror)
{
    int f=R/2;
    if((R%2==1) && Mirror==')'){f++;}
    if(Mirror == ')'){f=-f;}
    return f;
}
, In this Programming Language: Java, Now tell me if this Code is compilable or not?