There are 2 methods in a class. Both have the same method
signature except for return types. Is this overloading or
overriding or what is it?

Answer Posted / ashu_deepu

it is not overloading bcos different return types does not mean overloading.
n 4 overriding inheritance should b used between 2 classes.
so it is neither overriding nor overloading.

Is This Answer Correct ?    8 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain different ways of creating a thread?

529


Why is the type for real numbers called double?

545


What are abstract methods in java?

655


Can we force the garbage collection to run?

538


What are void methods?

572






What methods are used to get and set the text label displayed by a button object?

554


Can we create our own wrapper class in java?

545


How do you delete a list in java?

534


Tell us something about different types of casting?

521


Explain about instanceof operator in java?

609


What are the main uses of java?

526


Is minecraft 1.15 out?

548


What is a variable simple definition?

579


How we can generate random numbers in java?

610


What is enhanced loop in java?

550