【单选题】给定如下Java代码,下列( )选项可以加入到Sample类中,并重写amount方法。 c1ass Super { public double amount(double a) { return a*0.8; } } public class Sample extends Super{ }
A.
public void amount (){ }
B.
public float amount ( ){ retum 4.0f; }
C.
public amount (double d){ }
D.
public double amount (double d){ return 4.0*d; }