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

What's new in the .net 2.0 class library?

543


What is an interrupt? : Dot net architecture

508


Explain about generation?

572


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

488


Explain is development of a mobile web application with asp.net is very easy? : Microsoft dot net mobile

519






What is the use of CLR in .NET?

601


Explain cache? : Dot net architecture

599


I want to create a project like google maps how can we do that with atlas?

484


Tell me .net mobile emulators? : Microsoft dot net mobile

559


how to add list of items in a web application and win application?

1601


Define domestic architecture artifacts? : Dot net architecture

529


What is a service class?

541


4. Wcf- what Asych and Sych call and how that works

1447


if there are two application 1 and 2 having a variable x in both app if client1 changes value of x in 1 app client 2 want reads the value of x from 2 app what resultant value will he get

1860


What does this do? Gacutil /l | find /i "corillian"

613