English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

3 answers

Method overloading and method overriding both support inheritance.Method overriding in Java works like Virtual function in C++.
So Overloading is done at compile time and overriding is done at run time.

2006-10-21 08:39:43 · answer #1 · answered by indian 2 · 0 0

Method overloading and overriding are supported in inheritance both are concept of polymorphism. Overriding is run-time and Overloading is compile time thats all.

2006-10-18 05:51:31 · answer #2 · answered by Sudha P 2 · 0 0

Because the method overloading relationship is internal to a class where as method overriding relationship is between a parent class and a child class.
i.e...,overriding blocks(hides) the definition of a method of a parent class which have the same method signaures in the child class where as the metod overloading doesn't because its method signitures are different.

2006-10-18 04:04:06 · answer #3 · answered by nareshmaddirala 1 · 0 0

fedest.com, questions and answers