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 / shamsherabanu
It is not overloading because overloading must have different parameters, no matter what ever may be the return type is.
And for overriding inheritance should be used between 2 classes.
so it is neither overriding nor overloading.
It just show compilation error as method is already defined in
same class
| Is This Answer Correct ? | 12 Yes | 0 No |
Post New Answer View All Answers
How to perform quicksort in java?
What is java basic concept?
How destructors are defined in java?
What are the advantages of assembly language?
difference between byte stream class and character stream class?
What is java english?
Can we extend singleton class?
What are the different types of multitasking?
What is the significance of listiterator?
What is return used for in java?
What are the access modifiers in java?
What are the benefits of immutable objects?
What is ph and buffers?
What are runtime exceptions?
What is the purpose of void?