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 difference between kpo and it industry? that is in terms of work, package etc

1534


How do you initialize a static member of a class with return value of some function?

668


5. How do you round the addition or subtraction of two numbers in assembler?

1774


when we use mantis? how learn mantis?

1689


If u need any fake experience certificate in software side, contact me at: vikramyadhav@gmail.com

7841






I m new to the dbms. Recently i came across words clustered indexes & nonclustered indexes but i dont know what is this all about & whats the difference between them.. So please help me!!!!!!!!

1536


details description on this mantis? who is founder of this mantis?

1679


is it acceptable if we declare multiple exceptions in same overridden method.

2110


My Qualification is MCA.My interview is on 5th may.They may ask q as------AS u r MCA...Why u r not tring anywhere else? What can be the ans?

1491


sample code for data transfer between two r/2 systems and r/3 systems?

1493


Given an array of size n. It contains numbers in the range 1 to n. Find the numbers which aren?t present.

624


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

1641


what is best way to create a Thread class & why?

1586


please any one pass file aid,xpeditor and endeavor tools

1887


Given an array of size n+1 which contains all the numbers from 1 to n.Find the number which is repeated in O(n) time.How do you proceed with the same with floating numbers from 0 to 1 instead of 1 to n?

604