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?



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

Answer / 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

More C Interview Questions

What is the use of getchar() function?

0 Answers  


The file stdio.h, what does it contain?

0 Answers  


What does *p++ do? What does it point to?

0 Answers  


What is structure packing in c?

0 Answers  


What is structure of c program?

0 Answers  


How can I read and write comma-delimited text?

0 Answers  


In a switch statement, what will happen if a break statement is omitted?

0 Answers  


what is the output of the following program? #include<stdio.h> void main() { int x=4,y=3,z; z=x-- -y; printf("\n%d %d %d",x,y,z); }

14 Answers  


What are the salient features of c languages?

0 Answers  


Does c have function or method?

0 Answers  


What is the maximum no. of arguments that can be given in a command line in C.?

0 Answers   HCL,


What is c basic?

0 Answers  


Categories