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
Hai, My name is nisha.I have NIC exam.If anybody Knows NIC previous paper pattern pls send me to nishanairp@gmail.com
5.Call by value and Call by reference with program?
WHat is execution in manual testing and when will we start execution and what language we use in execution
Display names and numbers of employees who have 5 years or more experience and salary less than Rs.15000 using array of structures (name, number, experience and salary)
What is the Difference between in memory database and physical database
what is the difference between Windows application and Unix application?
How to create a new dataset only duplicate observations in proc sort procedure?
what are the topics choosen for jam round for interviews
When you deliver your C++ headers and C++ library of a class (what all can you change in the class so that application using your class does not need to recompile the code)
what is the purpose of checked Menu options
how do you generate source code for the automatic generation for receipt number
How to use string functions in QTP?give some examples
qtp 9.2 14 days demo version was expired.I uninstalled how to reinstall this again
What for decision coverage and modified condition decision coverage are used? Wat is the difference between them?
What is test execution and when will we start execution please send me one example for this question