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

Can a class have 2 constructors?

701


what is predefined function in java?

775


What is the difference between a local variable and an instance variable?

793


What is regex java?

823


what is object slice?

1787


How can you write a loop indefinitely in java programming?

798


How to run a JAR file through command prompt?

988


How do you make an arraylist empty in java?

726


What are the 3 types of control structures?

747


What is the difference between declaration and definition in java?

776


What is integers and example?

734


What is java and its types?

797


Explain tree set and its features?

837


What is an abstract method in java programming?

832


What is the default value of local and global variables?

870