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 |
A string of charaters were given. Find the highest occurance of a character and display that character. eg.: INPUT: AEGBCNAVNEETGUPTAEDAGPE
What is the use of sas software? Is sas and sap are different?
What is easiest way to get the PL/i compiler,I didn't have found the compiler in my library. Is there any extra cost if we want to access the PL/1 programs?Actually we r having Mainframe rented training Ids
I want Ada programming language books. Could anyone post me any link for that?
What is the meaning of .(dot) in .NET framework?
what is an INI file?
what are the steps for creating prompt table dynamically for the specified field
Write a program to calculate the following i want a Java program for this condition 1+4+9+16+….+100 Like this (1^2+2^2) Hint use function pow(a,b)
why we use new keyword for object
How do i find out the number of parameters passed into function?
How to link calculator in oops concept? how is it working in oops concept? why dont u using in beginning of program 'z' in abap(sap)?
Difference between delegates and Events?