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

class A{ void me(){s.o.p("");} class B extends A{ void me()
{s.o.p(" ");} class M{ A a=new B(); B b=new A(); a.me();
b.mne();} what is the output of this, how?

Answer Posted / sk

B b=new A();

you cannot assign a superclass object to a reference of
subclass.

Is This Answer Correct ?    21 Yes 4 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

what is delegate and how works delegate and event.

2190


Explain the difference between an expert and a novice user. How would your strategy for designing user interfaces for an expert user differ from that for designing user interfaces for a novice user.

3033


differences between qtp10.0 and 11.0 ?

2259


Have you used callsymputx? what points need to be kept in mind when using it?

1965


Suppose server object is not loaded into the memory, and the client request for it , what will happen?

2647


how sap is different from other software ?

2173


what is integration testing in real time applications?

2378


in network security,how we identified threat?some one say we found threat according to it's signature,but how we get signature or pattern of the virus?

2056


how does database connection using ADO.NET?

2027


How many forms can you create in a Visual Basic 6 Standard EXE project? Is there any limit on that?

1976


how to hide prompts

1862


What are the Short cut Keys of Tally ERP?

2289


i am exeprienced person what is selection process

1626


Plz sent me in .net 2.0 interview Question & answers?

2117


what is the main usage of an abstract keyword?please follow the program class A { void display() { System.out.println("hai"); } void print() { } } class B extends A { void print() { System.out.println("Hello"); } } In this program i was gives the implementation of print() according to my requirements in subclass.And there is no definition in superclass then why we can use abstract keyword before a method that i want to gives definition in other classes,is any mistakes in the above usage of method?

1976