difference between overloading and overridding

Answers were Sorted based on User's Feedback



difference between overloading and overridding..

Answer / pramod

overloading :- There are two functions which have the
same name and they differ only either in their argument
number or argument type like myfunction(int a) and
myfunction(float a).

Overriding :- There are two functions with the eaxtly same
name,same type. One of these functions is in base class and
one will be in derived class

Is This Answer Correct ?    10 Yes 1 No

difference between overloading and overridding..

Answer / sanish joseph

In overloading functions will have same name but different
signatures(type of parameters,number of parameters etc..).
but in overloading functions must have same name and signature.

Is This Answer Correct ?    14 Yes 6 No

difference between overloading and overridding..

Answer / $rav$...

OVERLOADING:-Principle of overloading is achieved through
polymorphism .we can have any number of methods with the
same name but the difference in the signature(:parameters ).
OVERRIDING:-Principle of overriding is achieved through
inheritance.we can have any number of methods with same
name,parameters and signature but the rewriting of the code
of the super class method in the subclass is done and we
give the new functionality to that method of keeping its
signature as the same.
dynamic binding prevails in overriding.inheritance is
compulsory.
static binding prevails in overloading.

Is This Answer Correct ?    5 Yes 1 No

difference between overloading and overridding..

Answer / k.senthil arasur sathyamangala

overloading:Two function have same name and same return type
but different type of arguments used.


overriding:Two function have same name and same arguments
used but that function defined in a base class redefined in
a derived class

Is This Answer Correct ?    3 Yes 0 No

difference between overloading and overridding..

Answer / preeti

in overloading methods can have the same name but must
have different parameter lists i.e signature

while in overriding if you declare a field in a subclass
with the same name as one in the superclass, the superclass
field can only be accessed using super or the superclasses
type

Is This Answer Correct ?    6 Yes 4 No

difference between overloading and overridding..

Answer / manish chakravarti

In overloading functions will have same name but different
signatures(type of parameters,number of parameters etc..).
but in overloading functions must have same name and
signature.

Is This Answer Correct ?    2 Yes 0 No

difference between overloading and overridding..

Answer / priyanka agrawal

In overloading functions will have same name but different
parameters lists but in overridding functions must have
same name and same signature.

Is This Answer Correct ?    3 Yes 2 No

difference between overloading and overridding..

Answer / manish chakravarti

overloading:Two function have same name and same return type
but different type of arguments used.


overriding:Two function have same name and same arguments
used but that function defined in a base class redefined in
a derived class

Is This Answer Correct ?    1 Yes 0 No

difference between overloading and overridding..

Answer / poorna chandar rao

mainly overloading and overriding is used java polymorphisum
conbcept
overloading is method name same and method signature also
same it is called static polymorphisum when object is
created that decided by static polymorphisum

overriding is method name same but differtn arguments this
is called dynamic ploymaorphisum

Is This Answer Correct ?    1 Yes 3 No

difference between overloading and overridding..

Answer / parthi

plse explain clearly diff tell me?

Is This Answer Correct ?    0 Yes 3 No

Post New Answer

More OOPS Interview Questions

how to create thread in java?

17 Answers   IBM, Infosys, Wipro,


What is the outcome of the line of code "cout<<abs(- 16.5);"? 1) 16 2) 17 3) 16.5

16 Answers   TCS,


WHAT IS ABSTRUCT DATA TYPE ? PLEASE EXPLAIN IT.

4 Answers   HCL,


Write a program to find out the number of palindromes in a sentence.

1 Answers   TCS,


Objective The objective of this problem is to test the understanding of Object-Oriented Programming (OOP) concepts, in particular, on encapsulation. Problem Description Create a program for managing customer’s bank accounts. A bank customer can do the following operations: 1. Create a new bank account with an initial balance. 2. Deposit money into his/her account. 3. Withdraw money from his/her account. For this operation, you need to output “Transaction successful” if the intended amount of money can be withdrawn, otherwise output “Transaction unsuccessful” and no money will be withdrawn from his/her account. Input The input contains several operations and is terminated by “0”. The operations will be “Create name amount”, “Deposit name amount”, or “Withdraw name amount”, where name is the customer’s name and amount is an integer indicating the amount of money. There will be at most 100 bank accounts and they are all created on the first month when the bank is opening. You may assume that all account holders have unique names and the names consist of only a single word. Output The output contains the transaction result of withdrawal operations and the final balance of all customers after some withdrawal and deposit operations (same order as the input). Sample Input Create Billy 2500 Create Charlie 1000 Create John 100 Withdraw Charlie 500 Deposit John 899 Withdraw Charlie 1000 0

0 Answers  






what is difference between String s=new String("vali"); String s="vali"

1 Answers  


what is the new version of oops

0 Answers   Ignou,


What is an example of genetic polymorphism?

0 Answers  


Can you explain polymorphism?

0 Answers  


#include <iostream> using namespace std; struct wow { int x; }; int main() { wow a; a.x = 22; int c = a.x; int *b = new int; cout << c; return 0; } option: No output 0 22 -(11) Will not compile

1 Answers   CTS, Wipro,


What is persistence in oop?

0 Answers  


why c++ is a highlevel language

3 Answers   Satyam, Tech Mahindra,


Categories