单项选择题

A.protected float getVar (){return x;}
B.public float getVar(){return x;}
C.protected float double getVar(){return x;}
D.public float getVar(float f){return f;}