给定如下Java代码,下列( )方法可以加入到Sample类中,并且能够编译正确。 public class Sample { public int getSomething(int d) { return d; } }
A.
private int getSomething(int i, String s) {}
B.
public void getSomething(int i) {}
C.
private int getSomething(int i, String s) {return 20;}
D.
public double getSomething() {return "abc"; }