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 / 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 |
Post New Answer View All Answers
SAS question: I have 50 fils a1,a2,...,a50. the primary key is upc. then if i want to merge all 50 files, the code is as follows, data test; merge a1 ... a50; by upc; run; we know that writing all 50 files name is time consuming, is there any standard format of this code?
why we use abstract in awt?
hi this is uday i want prepare for nic exam if any one have previous question papers please send me or atlest guide me how to prepare my ID is udaykiran4u@in.com
Suppose server object is not loaded into the memory, and the client request for it , what will happen?
Q1.Write a C program which asks the user for a number between 1 to 9 and shows the number. If the user inputs a number out of the specified range, the program should show an error and prompt the user for a valid input.
Hello Experts, What is the difference between move and move corresponding exactly? please post me asap
What is the entry point function of a DLL?
How many forms can you create in a Visual Basic 6 Standard EXE project? Is there any limit on that?
Given an array of size n. It contains numbers in the range 1 to n. Find the numbers which aren?t present.
In JCl , we have COND parameter.This holds comparison code and condition.It also has only and even parameters. ex: COND((4,GE),EVEN).what the comma mean here. is that 'and' or 'or'.
what is best way to create a Thread class & why?
Please forward important interview and basic questions in VB6 on my email id: usneha_16@yahoo.co.in
What do you understand by modular programming?
Which method protects back button to retrieve old value from previous page in Struts.
when will triggars the at new event in abap and web dybn pro?