Tuesday, November 29, 2011

What is the difference between hiding & overriding ?

overloading is related to one particular class.If we define two methods in the same class with same name,but different input parameters. Then it is called overloading.Overridig is related to super and sub class.He you define a method with same name , accepting same parameter as that of your super class. then the method in the sub class is said to override the method in the super class.
Category:Java Interview Questions

No comments:

Post a Comment