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?
Answers were Sorted based on User's Feedback
Answer / kay
class A
{
public virtual void me()
{ s.o.p(" hi");
}
}
class B extends A
{
public override void me()
{ s.o.p(" wat up!");
}
}
class M
{
A a = new B();
a.me();
B b = new A();
b.me();
}
//output :
hi wat up!
| Is This Answer Correct ? | 5 Yes | 5 No |
Find out the list of roles which gives access to GUI activities? thanks in advance
Write a program to implement BFS/ DFS routine in a connected graph
What is a singleton linked list?
What is the difference b/w Object base and object oriented programming?
How to print No.of.rows affected after updation using ADO.Net
how CLR identify vb file?
why you have to became a software developer?
What are the Short cut Keys of Tally ERP?
What is Partial class and its use?
what is the exact full form of OOPS,O -> object O -> oriented P -> programing S-> ? ....
through which algorithm does the garbage collector works? how the garbage collector will understand that the object will going to be deleted?
Write a program to find whether a given number is prime or not.