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