10. Overloding and overriding.

Answer Posted / pinki

Overloading methods
1.They appear in the same class or a subclass
2.They have the same name but, have different parameter
lists, and can have different return types.
An example of an overloaded method is print() in the
java.io.PrintStream class

Overriding methods
It allows a subclass to re-define a method it inherits from
it's superclass
overriding methods:
1. It appears in subclasses
2. They have the same name as a superclass method
3. They have the same parameter list as a superclass method
4. They have the same return type as as a superclass method
5. They have the access modifier for the overriding method
may not be more restrictive than the access modifier of the
superclass method

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

which is the institute in hyderabad for providing the live project industry training

2528


What is the purpose of cache? : Dot net architecture

717


Can you Explain element .net mobile with example? : Microsoft dot net mobile

669


Explain the number or character entered through keyboard gets converted to equivalent ascii code & it get stored on ram in the binary form.

703


State and explain about microsoft.net?

703


Does .NET runtime offer Deterministic Destruction or not?

754


Waht is Dot net Arcitecture

2131


Whate are resource files? How are they used in .net?

663


What is the mesi? : Dot net architecture

712


What is Object Caching in Visual Studio 2010?

755


inprocess vs out process session state : Dot net architecture

708


What is gui programming? : .NET Architecture

689


How to improve the cache performance? : Dot net architecture

697


What is an asssembly qualified name? Is it a filename? How is it different?

691


What is a virtual memory? : .NET Architecture

689