ALLInterview.com :: Home Page KalAajKal.com
 Advertise your Business Here     
Browse  |   Placement Papers  |   Company  |   Code Snippets  |   Certifications  |   Visa Questions
Post Question  |   Post Answer  |   My Panel  |   Search  |   Articles  |   Topics  |   ERRORS new
   Refer this Site  Refer This Site to Your Friends  Site Map  Bookmark this Site  Set it as your HomePage  Contact Us     Login  |  Sign Up                      
tip   To Refer this Site to Your Friends   Click Here
Google
 
Categories  >>  Software  >>  Microsoft Related  >>  VB.NET
 
 


 

 
 Visual Basic interview questions  Visual Basic Interview Questions
 C Sharp interview questions  C Sharp Interview Questions
 ASP.NET interview questions  ASP.NET Interview Questions
 VB.NET interview questions  VB.NET Interview Questions
 COM+ interview questions  COM+ Interview Questions
 ADO.NET interview questions  ADO.NET Interview Questions
 IIS interview questions  IIS Interview Questions
 MTS interview questions  MTS Interview Questions
 Crystal Reports interview questions  Crystal Reports Interview Questions
 BizTalk interview questions  BizTalk Interview Questions
 Dot Net interview questions  Dot Net Interview Questions
 Exchange Server interview questions  Exchange Server Interview Questions
 SharePoint interview questions  SharePoint Interview Questions
 Microsoft Related AllOther interview questions  Microsoft Related AllOther Interview Questions
Question
What is the Difference between Overriding and overloading? 
 Question Submitted By :: Guest
I also faced this Question!!     Rank Answer Posted By  
 
  Re: What is the Difference between Overriding and overloading?
Answer
# 1
overloading-------having same method name with different 
signatures.
 overriding--------methods name and signatures must be same.
 
Is This Answer Correct ?    26 Yes 6 No
Vimal
 
  Re: What is the Difference between Overriding and overloading?
Answer
# 2
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 ?    25 Yes 5 No
Lakshmi Prabha
 
 
 
  Re: What is the Difference between Overriding and overloading?
Answer
# 3
Overloading: Methods have different signature but same
behavior or functionality.

Overriding: Methods have same signature but different bevior
or functionality.
 
Is This Answer Correct ?    3 Yes 12 No
Raza Hussain Rajper
 
  Re: What is the Difference between Overriding and overloading?
Answer
# 4
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 ?    15 Yes 1 No
Prachee
 
  Re: What is the Difference between Overriding and overloading?
Answer
# 5
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 ?    11 Yes 0 No
Sonia
 
  Re: What is the Difference between Overriding and overloading?
Answer
# 6
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 ?    4 Yes 0 No
Omar
 
  Re: What is the Difference between Overriding and overloading?
Answer
# 7
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 ?    11 Yes 1 No
Sudhakar Singh Rajput
 
  Re: What is the Difference between Overriding and overloading?
Answer
# 8
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 ?    5 Yes 0 No
Nazrul
 
  Re: What is the Difference between Overriding and overloading?
Answer
# 9
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 ?    2 Yes 1 No
Deepika Singh
 
  Re: What is the Difference between Overriding and overloading?
Answer
# 10
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 ?    4 Yes 1 No
Sanjay
 
  Re: What is the Difference between Overriding and overloading?
Answer
# 11
overloading-------having same function name but with
different signatures.
 overriding--------function name and signatures must be same.
 
Is This Answer Correct ?    0 Yes 2 No
Anu
 

 
 
 
Other VB.NET Interview Questions
 
  Question Asked @ Answers
 
hi dear ! thank u for replying to my question regarding adding third party software in vb.net .My next question is that i haven created Data base in SQL server 2000 for Library and has connected that with VB and VB.net separately but it only works on single computer and when i takes my software to another computer on same Network it does not work . Can any body help me what i do to solve. Regards!  1
concept of object oriented programming Patni5
How is VB.Net different from VB6? Ksb7
Why Datareader is useful?  5
ColumnMapping belongs to which namespaces?  1
What is CLR?  11
What is an abstract class?  3
What is the Difference between Web User Control and Web Custom Control?  5
What is the Common Language Runtime? Ksb8
What is the DIfference between Friend and Protected Friend? CTS5
What is the difference between Abstract Classes and Interfaces? Give the answer as a table format....  5
Difference between VB dll and assemblies in .NET ? Digital-GlobalSoft5
There are three versions of VB6--Learning Edition, Professional and Enterprise. Is VB.Net similar?  1
What is shadowing? TCS3
What are Major Feature of VB.NET Over C#.NET  9
How do you rate yourself in .NET ? Infosys3
1.wht is satellite assembly??? 2.How Garbage Collector works can u explain ???? ABC3
Advantage of vb.net over vb ? Digital-GlobalSoft5
What is the Difference between CLR & CTS?  2
how to call a list box on the text if some one send me the code for it  1
 
For more VB.NET Interview Questions Click Here 
 
 
 
 
 
   
Copyright Policy  |  Terms of Service  |  Help  |  Site Map 1  |  Articles  |  Site Map  |   Site Map  |  Contact Us interview questions urls   External Links 
   
Copyright © 2007  ALLInterview.com.  All Rights Reserved.

ALLInterview.com   ::  Forum9.com   ::  KalAajKal.com