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


Please Help Members By Posting Answers For Below Questions

Hai, My name is nisha.I have NIC exam.If anybody Knows NIC previous paper pattern pls send me to nishanairp@gmail.com

1748


5.Call by value and Call by reference with program?

1836


WHat is execution in manual testing and when will we start execution and what language we use in execution

1483


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)

4303


What is the Difference between in memory database and physical database

2083






what is the difference between Windows application and Unix application?

2162


How to create a new dataset only duplicate observations in proc sort procedure?

1618


what are the topics choosen for jam round for interviews

1162


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)

729


what is the purpose of checked Menu options

1986


how do you generate source code for the automatic generation for receipt number

3829


How to use string functions in QTP?give some examples

7121


qtp 9.2 14 days demo version was expired.I uninstalled how to reinstall this again

2356


What for decision coverage and modified condition decision coverage are used? Wat is the difference between them?

1630


What is test execution and when will we start execution please send me one example for this question

1431