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
what is delegate and how works delegate and event.
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.
differences between qtp10.0 and 11.0 ?
Have you used callsymputx? what points need to be kept in mind when using it?
Suppose server object is not loaded into the memory, and the client request for it , what will happen?
how sap is different from other software ?
what is integration testing in real time applications?
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?
how does database connection using ADO.NET?
How many forms can you create in a Visual Basic 6 Standard EXE project? Is there any limit on that?
how to hide prompts
What are the Short cut Keys of Tally ERP?
i am exeprienced person what is selection process
Plz sent me in .net 2.0 interview Question & answers?
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?