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

what is the software to run the GSM gate opener program

1653


when will triggars the at new event in abap and web dybn pro?

1488


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.

2273


what is the difference between rename and label

1810


what are other resources are needed for this mantis?

1512






what is woransient key word? how it is used in java

1801


which book we learned this mantis? how many version are realsed this mantis upto now?

1419


Colors specified with the notation

1801


what is the last ant version you worked?how to get it

1461


public static void main(String args[]) describe it

1575


What is diffrent between Method and and function in c#

1530


What is the difference between COM and CORBA?

723


Write a shell program where you enter a number which corresponds to K.M. Find out the corresponding values in m, cm, inches, and feet. Hints:- 1 k.m= 1000 m 1 m= 100 cm 1 inches= 2.54 cm. 1 feet= 12 inches

1518


I m new to the dbms. Recently i came across words clustered indexes & nonclustered indexes but i dont know what is this all about & whats the difference between them.. So please help me!!!!!!!!

1529


what do u mean by tagging

1614