what is overloading and overriding?

Answer Posted / dinesh

OVERLOADING:Two methods are having same name and different arguments in same class
OVERRIDING: Two methods are having same name and same arguments also same return types in its class and sub class (from 1.5 on words co-varient return types also allowed this is applicable for only for object types not primitives)i.e some relation either parent to child or child to parent

Is This Answer Correct ?    1 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is oops in programming?

562


Why is static class not inherited?

592


What does and I oop mean?

612


Why polymorphism is used in oops?

581


Why do we need oop?

663






is there any choice in opting subjects like 4 out of 7

1727


Why do we use class in oops?

553


can inline function declare in private part of class?

3655


IS IT NECESSARY TO INITIALIZE VARIABLE? WHAT IF THE INSTANCE VARIABLE IS DECLARED final ? IS IT NECESSARY TO INITIALIZE THE final VARIABLE AT THE TIME OF THEIR DECLARATION?

1576


What are the types of abstraction?

553


i am getting an of the type can not convert int to int *. to overcome this problem what we should do?

1833


Why is it so that we can have virtual constructors but we cannot have virtual destructors?

3825


This program numbers the lines found in a text file. Write a program that reads text from a file and outputs each line preceded by a line number. Print the line number right-adjusted in a field of 3 spaces. Follow the line number with a colon, then one space, then the text of the line. You should get a character at a time and write code to ignore leading blanks on each line. You may assume that the lines are short enough to fit within a line on the screen. Otherwise, allow default printer or screen output behavior if the line is too long (i.e., wrap or truncate). A somewhat harder version determines the number of spaces needed in the field for the line numbers by counting lines before processing the lines of the file. This version of the program should insert a new line after the last complete word that will fit within a 72-character line.

1635


What are the 4 pillars of oop?

667


Write a program to reverse a string using recursive function?

1788