मराठी

Which of the following pairs of methods will cause a compile-time error due to incorrect method overloading? - Computer Applications

Advertisements
Advertisements

प्रश्न

Which of the following pairs of methods will cause a compile-time error due to incorrect method overloading?

पर्याय

  • void test(int a, int b) and void test(double a, double b)

  • void test(int a, double b) and void test(double a, int b)

  • void test(int a, double b) and void test(int a)

  • void test(int a) and int test(int a)

MCQ
Advertisements

उत्तर

void test(int a, double b) and void test(int a)

Explanation:

The first method prototype expects an int a and a double b, whereas the pairing method sends only an int.

shaalaa.com
  या प्रश्नात किंवा उत्तरात काही त्रुटी आहे का?
2024-2025 (March) Official Board
Share
Notifications

Englishहिंदीमराठी


      Forgot password?
Use app×