Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


What is the Difference between Overriding and overloading?

Answers were Sorted based on User's Feedback



What is the Difference between Overriding and overloading? ..

Answer / vimal

overloading-------having same method name with different
signatures.
overriding--------methods name and signatures must be same.

Is This Answer Correct ?    324 Yes 44 No

What is the Difference between Overriding and overloading? ..

Answer / lakshmi prabha

OverLoading : All the method will share the same name but
it differes based on the parameter, type of parameter and
number of parameter

Overriding : The method in the derived class the has the
same name in the base class and it changes the behaviour or
functionality of the method in the base class.

Is This Answer Correct ?    250 Yes 24 No

What is the Difference between Overriding and overloading? ..

Answer / prachee

overloading has same method but different types of
parameters, number of parameters.

overloading does not take return type to differentiate
overloaded method.

ex:
int add(int a, int b)
int add(float a , float b)
are overloaded methods

overriding comes with inheritance concept.
here parent and child both contains the same method. and
when execution takes place; child's method is called.

Is This Answer Correct ?    124 Yes 14 No

What is the Difference between Overriding and overloading? ..

Answer / sonia

OVERLOADING is the process of declaring the methods having
the same name but diff signatures. Signature means diff
types & number of arguments.

OVERRIDING is the process of overwriting the methods of
base class in Derived Class.

Is This Answer Correct ?    108 Yes 8 No

What is the Difference between Overriding and overloading? ..

Answer / nazrul

overriding->
1) method should be public.
2)it need inheritance.
3)it need virtual keyword before it declartion.
4)it have same name with same parameter in diffrent class.
5)it require non-static method.
6)method should have same datatype.
Overloading->
1)method can be different access speicifier.
2)it doesn't need inheritacne.
3)all method should be in same class.
4)method can have diffrent datatypes

Is This Answer Correct ?    88 Yes 8 No

What is the Difference between Overriding and overloading? ..

Answer / deepika singh

OVERLOADING:- 1) overloaded methods have the same name but
different parameter list.
2)a subclass method can overload a superclass method

eg:-int add(int a, int b)
int add(float a , float b)
are overloaded methods



OVERRIDING:-
it just in inheritance and the overriding
method must hold the same name and the same signatures .
the change maybe just in behavior .


The Cat class in the following example is the subclass and
the Animal class is the superclass. The Cat class overrides
eat() method inherited from Animal class.

public class Animal {

public void eat() {
System.out.println("Eat for Animal");
}
}

public class Cat extends Animal {

public void eat() {
System.out.println("Eat for Cat");
}
}

Is This Answer Correct ?    62 Yes 10 No

What is the Difference between Overriding and overloading? ..

Answer / sudhakar singh rajput

1-OverLoading is Resolved at COMPILE TIME.But Overridding is
resolved at RunTime.

2-OverLoaded Methods Can Change Access specifiers.in
overridding the access level of overridden method(in derived
class) must not be more restrictive than that of overridden
method(of base class)

3-Overloaded methods can declare new exceptions.But
overridden method must not throw new exceptions than those
declared by overridden method.

Is This Answer Correct ?    51 Yes 10 No

What is the Difference between Overriding and overloading? ..

Answer / yugal

OVERLOADING is the process of declaring the methods having
the same name but diff signatures. Signature means diff
types & number of arguments.
OVERRIDING is the process of overwriting the methods of
base class in Derived Class.

Overriding is the example of run-time polymorphism and
Overloading is the example of compile-time polymorphism.
Overloading

1) Method can have different access specifier.
2) Method can have different return type
3) Method must have same name with different method
signatures.
4) It doesn't need inheritance as method should be in
same class.

Overriding->

1) Method must have same access specifier.
2) Method must have same return type.
3) Method must have same name with same method
signatures.
4) It needs inheritance and virtual keyword before it
declaration.
5) It requires non-static method.

Is This Answer Correct ?    27 Yes 5 No

What is the Difference between Overriding and overloading? ..

Answer / omar

overriding: it just in inheritance and the overriding
method must hold the same name and the same signatures .
the change maybe just in behavior .

overloading : maybe in inheritance or in other way but must
to do overloading must the method hold the same name and
must change signatures.
remark:we can not only change th return type.

Is This Answer Correct ?    35 Yes 16 No

What is the Difference between Overriding and overloading? ..

Answer / sanjay

1-OverLoading is Resolved at COMPILE TIME.But Overridding is
resolved at RunTime.

2-OverLoaded Methods Can Change Access specifiers.in
overridding the access level of overridden method(in derived
class) must not be more restrictive than that of overridden
method(of base class)

3-Overloaded methods can declare new exceptions.But
overridden method must not throw new exceptions than those
declared by overridden

Is This Answer Correct ?    28 Yes 9 No

Post New Answer

More VB.NET Interview Questions

i am attending to US consulate i kept my projects on vb.net ,please help me what questions will be ask on vb.net in us consulate

0 Answers  


How do you do multithreading application in VB ?

4 Answers   Satyam,


i had attended to infosys interview on 17th april 2010...on .net..3+ experience .. to my knowledge i did well in technical and they asked me to wait for next process ..so i waited for 15 min ..later one person came and said give 7-10 days time for intimation of next process do they keep technical and hr on different day ...or i loose the interview ..am confused yaar what accuatly would be happend

2 Answers  


What is late binding?

0 Answers  


how to connect crystal report with vb.net ?

6 Answers   Patni,


What do you understand by vb.net?

0 Answers  


what is the advantage of option strict on?

0 Answers  


I Am Developing A project where I can send Message from One Computer to Another Computer With The Help Of LAN.Already I Have developed..It is working Fine With The Details Of ..TO,FROM,REF No,DATE,BODY...Now I Want To Add Attachments part in the same projects...How Can I Send Attachment File & How To Send It..I Am Working in VB.Net 2005 With out Any database. Can Any One Help me ??How To Write Code??Plz Send me a copy to my Mail also...I Dont Need Any Software Available in The Internet...Plz refer me The Code in VB.Net maloy.adhikari@in.com

0 Answers  


Explain the difference between value and reference types?

0 Answers  


What is pre-jit?

0 Answers  


Explain about globalization?

0 Answers  


How to view an assembly?

0 Answers  


Categories