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 are the modifiers available in c programming language?

1280


What is c mainly used for?

1120


please give me a VIRTUSA sample palcement papers.... you will only send TECHNICAL SECTION..... that is help for me Advance Thanks........................

2098


What language is lisp written in?

1326


What is the difference between formatted&unformatted i/o functions?

1111


What is the difference between c &c++?

1211


I have written a pro*C program to fetch data from the cursor. where in i have used the concept of BULK FETCH.... each FETCH statement is taking lots of time to fetch specified number of rows at...

10251


In C, What is the #line used for?

2333


What are variables and it what way is it different from constants?

1286


What is the difference between ++a and a++?

1274


Give me the code of in-order recursive and non-recursive.

1423


What is getch() function?

1109


An integer that indentifies the position of a data item in a sequence of data items a) value b) number c) index d) all of the above

1265


Explain which of the following operators is incorrect and why? ( >=, <=, <>, ==)

1091


What is variable in c example?

1133