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 / sk

B b=new A();

you cannot assign a superclass object to a reference of
subclass.

Is This Answer Correct ?    21 Yes 4 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Hi all... I had completed MSC(Computer) and had join the construction company based on sap.they want me to work on abap.but software company is totally different from construction company and they want me 2 grasp it as fast i can.i am finding it difficult.what should i do??????

1409


what is difference between input parameter and output parameter.

4217


Hi I am Rathnam, How To Remove the duplicates with out using remove duplicate stage in the datastage

1528


19. Given a system that is described with the following equation, X=A+(B.(A̅+C)+C)+A.B.(D̅+E̅) a) Simplify the equation using Boolean Algebra. b) Implement the original and then the simplified equation with a digital circuit. c) Implement the original and then the simplified equation in ladder logic.

1252


A good website has the following conditions It should be interactive. It should contain at least 20 images. Title cannot be null and should contain at least 10 letters other than spaces and hyphen (-). The keywords should contain atleast three among the following list : "design", "Graphics", "lovely", "beautiful", "amazing" and "mesmerising" Write a method: boolean isGoodWebsite(boolean isInteractive, int numOfImages, String title,String keywords[]) isInteractive whether the site is interactive or not numOfImages Number of images on the website title Title of the website keywords Array of keywords in the website.

1786






Iam using Microsoft Visual Studio to create a system for mobile store I want to know how to calculate mobile price that the customer buy and how to reduce quantity from the data base that we have for mobile .And also how to calculate revnue for each mobile and revnue for the total mobile

1485


Please forward important interview and basic questions in VB6 on my email id: usneha_16@yahoo.co.in

1580


What are two of your strengths that you will bring to our QA/testing team?

1649


Outline the two important features of a terminating recursion. Any ideas?

1689


What is SOLID Principle in Programming Language?

660


Compare any 4 software development life cycle paradigms with each other. Indicate at least one application for each of the paradigms that are suitable to developed using that paradigm.

2368


what is adodb??y it is used for connection of V.B and access??what is ado?dao?

1776


THE CHANNEL IN DATA COMMUNICATION CAN BE?

1568


Describe the difference between Interface-oriented, Object-oriented and Aspect-oriented programming

11132


smal talk is pure object oriented or not?

1529