Convert Math Equation To Java