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
can we extend a class having only one parameterised constructor.Suggest the process to do it.
what is the current salary package in India for a lamp programmer
what is the basic and unique feature of dotnet
Which language they use during interview?
In mainframe SDSF, Can we copy the list of jobs currently executing in SDSF in to a seperate DATASET...?
Write a program that prints the numbers from 1 to 100. But for multiples of three print "Fit" instead of the number and for the multiples of five print "Bit". For numbers which are multiples of both three and five print "FitBit".
what are all the ant command options
what is delegate and delegation model give the real live example on delegate model
Define Form modules, Class modules and Standard modules
how do u handle table control inbdc explain the process in steps iwant the answer in urgent please forward this even i know how to explain there
which worker is involved in all the phases of SDLC?
What is the difference between CLEAR & RESET and OPEN & CLOSE OPCOEDS(USING RPG/400).wheare we can use this?can any body tell me in real time senario with example please?
What binary value will be internally stored for NULL for the type S9(1) COMP 3 in mainframe
One boy has to climb steps. He can climb 1 or 2 steps at a time. Write a function that will returns number of way a boy can climb the steps. Int WaytoSteps(int n) (eg:- suppose number of steps is n=4 ,the function will return 5 (one-one-one-one ,one-one-two, one-two-one-,two-one-one, two-two)
can any one suggestion me present which course(except java,.net) has huge demand in the market?