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

Trace the O/p for a program on inheritance and Polymorphism.

3 classes A,B,C

A with two methods

public virtual SomeMethodA

public virtual SomemoreMethodA

B:A
overide virtual SomeMethodA

C:B
new Method SomeMethodA

override SomeMoreMethodA

main method
{
b new instance of B
b.SomeMethodA
b.SomeMoreMethodA

b1 new instance of C
b1.SomeMethodA
b1.SomeMoreMethodA
}

Answer Posted / payal

call B's SomeMethodA
Call A's SomeMoreMethodA
call C's SomeMethodA
call C's SomeMoreMethodA

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Can main method be final?

949


How do I do implement a trace?

1158


How do you prevent a class from being inherited?

963


What is difference between static and readonly in c#?

1090


What are the 3 types of comments in c#?

992


Why it's said that writing into .NET Application Configuration Files is a Bad Idea?

1012


How to use nullable types in .net?

1045


What is the difference between C# 3.5 and C# 4.0?

994


Is c sharp and c# are same?

968


What do you mean by parsing and how to parse a date time string in c#?

1042


What is session state in asp net c# with example?

945


How many types of variables are there in c#?

1015


What is the difference between system.string and system.text.stringbuilder classes?

1050


Define Abstract Class in C#

1026


What issues can be faced while delivering code?

1970