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

Explain the difference between primary & secondary storage device? : Dot net architecture

521


What is Object Caching in Visual Studio 2010?

607


Explain the difference between l1 and l2 cache? : Dot net architecture

563


how to change the application name?

1512


Explain the race around condition? How can it be overcome? : Dot net architecture

537






Explain difference between machine config vs. Web config : Dot net architecture

490


How do we do authentications using atlas?

541


What is the difference between metadata and menifest ?

474


State and explain about microsoft.net?

540


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

519


What is the problem with .net generics?

616


Explain the number or character entered through keyboard gets converted to equivalent ascii code & it get stored on ram in the binary form. What is the exact procedure on hardware that converts the ascii value to binary? : .NET Architecture

459


What are relation objects in dataset?

559


What is difference between .net and visual studio?

528


how we can fire event in databound column in datagrid without using button?

596