Menu
Question Index
...

If the following methods are declared in a class, which of them fail to compile because of overloading rules?

int multiplication(int a, int b)    // 1
float multiplication(float a, int b)    // 2
float multiplication(int a, float b)    // 3
void multiplication(float a)    // 4
int multiplication(int a)    // 5
void multiplication(int a)    // 6


2, 3, 4, 5 and 6
4, 5 and 6
4 and 6
4 and 5
5 and 6
All are correct

Doubts

Problems

Topic: Method Overloading In Java

Read this topic
Take test on this topic

0
Wrong
Score more than 2 points

© meritcampus 2019

All Rights Reserved.

Open In App