java 问题(string 方法)

f1 = new Fraction(3, -4); 
    System.out.println(f1 + "\t// Correct answer: -3/4");
    System.out.println(f1.value() + "\t// Correct answer: -0.75");

value 用 public double, 应该怎么写?

    public double value() {
        return (double) numerator / denominator;
    }

感谢大哥!!