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
You're given a Boolean 2D matrix, can you find the number of islands?
Distinguish between a predicate and a function?
Explain serialization and deserialization in java?
Which is better 64 bit or 32 bit?
Tell me how many ways are there to initialise an integer with a constant.
What is the difference between sop and work instruction?
What is an exception? difference between Checked and Unchecked exception in Java
Can an anonymous class be declared as implementing an interface and extending a class in java programming?
How to declare an arraylist in java?
Can a class extends itself in java?
Which language is java?
what is the difference between yielding and sleeping? : Java thread
Explain java heap space and garbage collection?
What is a protected void?
Why do we use predicate in java?