public class MethodOver { private int x, y; private float z; public void setVar(int a, int b, float c){ x = a; y = b; z = c; } } Which two overload the setVar method?()
- A、 void setVar (int a, int b, float c){ x = a; y = b; z = c; }
- B、 public void setVar(int a, float c, int b) { setVar(a, b, c); }
- C、 public void setVar(int a, float c, int b) { this(a, b, c); }
- D、 public void setVar(int a, float b){ x = a; z = b; }
- E、 public void setVar(int ax, int by, float cz) { x = ax; y = by; z = cz; }
正确答案:B,D
答案解析:有
微信扫一扫手机做题