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 big is a pointer?
What is the difference between abstraction and encapsulation?
What invokes a thread's run() method in java programming?
Where can i get Latest SUN Certification Dumps and what are the Sun Certification Codes that are available, Im new to JAVA, so please gimme info as i need to write J2EE - Core Java Certification
What is null mean in java?
What is difference between checked and unchecked exception in java?
What is a boolean used for?
What is JDBC Driver interface?How can you retrieve data from the ResultSet
Why java is said to be pass-by-value ?
Explain treeset?
Outline the major features of java.
What do you mean by JVM?
What is run time allocation?
What are the four versions of java?
What is covariant return type?