What restrictions are placed on method overloading and
method overriding?

Answer Posted / shamik

@ above one correction ...

the return type of overriding method can be a subtype of the type returned in the overridden method .It need not be exactly same .

Is This Answer Correct ?    6 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

When would you use a static class?

584


Does garbage collection occur in permanent generation space in jvm?

608


What are the advantages of exception handling in java?

649


Why do you canvas?

611


Can we override constructors?

544






What are autoboxing and unboxing? When does it occur?

534


Why is method overloading not possible by changing the return type in java?

589


How do you escape in java?

578


What is object-oriented paradigm?

613


What is length in java?

569


What is the use of System class?

609


What is an infinite loop?

546


Can we serialize singleton class?

530


What are accessor methods in java?

554


Are there structures in java?

553