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
Why is the type for real numbers called double?
What is the purpose of a volatile variable?
what is the difference between yielding and sleeping? : Java thread
Can we override constructor?
What is argument in java?
Is array an object in java?
What is the base class of all classes?
How do you convert an int to a double in java?
What is the generic function?
How can we make a class singleton?
What is a nonetype?
What is the argument in java?
What is difference between fail-fast and fail-safe?
Should database connections be singleton?
What are the types of literals?