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 output buffer?
Can we use both this () and super () in a constructor?
What are the disadvantages of using inner classes?
What are the steps involved to create a bean?
Is array dynamic in java?
What is sleep method?
Why java is platform independent? Explain.
Which of the following classes will have more memory allocated?
What is high level language in computer?
Can we use String with switch case?
Can we serialize arraylist in java?
what do you mean by marker interface in java?
How do you calculate square roots?
What are peerless components in java programming?
What is regex java?