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 / mohamed yehiya
If both signature are same, i.e parameters
and if the method has co-variant return type
which means return type of int in one method and
return type of long in another method.
Consider safely as the method is overloaded.
if otherwise it's neither overloaded or overrided
just an another method in the class.
| Is This Answer Correct ? | 0 Yes | 5 No |
Post New Answer View All Answers
What is binary tree in java?
What is nextline method in java?
What is isa relationship?
How can we make a class singleton?
What do you mean by composition in java?
Can we sort set in java?
What is append function?
What is the basic concept of java?
What is the difference between an argument and a parameter?
Why there is no call by reference in java?
Can java run on google chrome?
What is defined as false sharing in the context of multithreading?
Difference between string, stringbuffer and stringbuilder?
What is the differences between c++ and java? Explain
What is difference between float and double?