已有函数:void fun1(int x, double y) { ...... },与该函数具有重载关系的是( )。
A: int fun1(int x, double y) { ...... }
B: void fun2(double x, double y) { ...... }
C: double fun2(int x, int y) { ...... }
D: void fun1(double x, double y, int z) { ...... }
A: int fun1(int x, double y) { ...... }
B: void fun2(double x, double y) { ...... }
C: double fun2(int x, int y) { ...... }
D: void fun1(double x, double y, int z) { ...... }
举一反三
- 已有函数:void fun1(int x, double y){...},与该函数具有重载关系的是____ A: int fun1(int x, double y){...} B: void fun1(double x, double y){...} C: void fun2(double x, double y){...} D: int fun2(int x, double y){...}
- 以下正确的函数声明形式是()。 A: double fun(int x, int y,double z); B: double fun(int x, int y,double z) C: double fun(int x ; int y; double z) D: double fun(int x, y; double z;)
- 以下正确的函数原型是: A: double fun(int x, int y); B: double fun(int, int); C: double fun(int x, int y) D: double fun(int x; int y); E: double fun(int x, y)
- 不能与该方法构成重载的方法是() public double fun(int x,double y){ return x + y; } A: public void fun(int x){ System.out.println("x * x="+(x*x)); } B: public void fun(int a, double b){ System.out.println("a +b ="+(a+b)); } C: public int fun(int x, int y,int z){ renturn (x+y+z); } D: public double fun(double x, int y){ return x * y ; }
- 以下函数定义正确的是() A: double fun(int x , y) B: double fun(int x; y) C: double fun(int x, int y) D: double fun(int x; int y)