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...

Juxtapose the use of override with new. What is shadowing?

Answer Posted / nawaz

Using override keyword to a method in the derived class
meaning the method provides a new implementation to the
overridden method (same signature) in the base class. The
base method must be virtual, abstract, or override.
By default a method is not modified by ‘virtual’. So if a
method in derived class wants to override the base
implementation, it needs to be modified by ‘new’ keyword.
This is called shadowing, not overriding. The method in the
derived HIDES the one in the base class.

Is This Answer Correct ?    3 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is sizeof int?

1108


What is a header file?

1085


Explain what are the different file extensions involved when programming in c?

1114


What are identifiers and keywords in c?

1107


Multiply an Integer Number by 2 Without Using Multiplication Operator

769


Is it better to use a macro or a function?

1165


Is it valid to address one element beyond the end of an array?

1175


Which one to choose from 'initialization lists' or 'assignment', for the use in the constructor?

1088


Write a C program to accept a matrix of any size. Find the frequency count of each element in the matrix and positions in which they appear in the matrix

2010


What is a MAC Address?

1066


Is c pass by value or reference?

1042


What is the collection of communication lines and routers called?

1129


What is sizeof c?

1081


In this problem you are to write a program that will cut some number of prime numbers from the list of prime numbers between 1 and N.Your program will read in a number N; determine the list of prime numbers between 1 and N; and print the C*2 prime numbers from the center of the list if there are an even number of prime numbers or (C*2)-1 prime numbers from the center of the list if there are an odd number of prime numbers in the list.

1855


What are the different types of control structures in programming?

1136