1.

If a function fun() is to sometimes receive an int and sometimes a double then which of the following is the correct way of defining this function?

A. static void fun(object i) { ... }
B. static void fun(int i) { ... }
C. static void fun(double i, int j) { ... }
D. static void fun(int i, double j) { ... }
Answer» B. static void fun(int i) { ... }


Discussion

No Comment Found

Related MCQs