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
Difference of Console, web & windows applications?
in teradata level primary in table level allows duplicates why?
You are given a dictionary of all valid words. You have the following 3 operations permitted on a word: delete a character, insert a character, replace a character. Now given two words - word1 and word2 - find the minimum number of steps required to convert word1 to word2. (one operation counts as 1 step.)
What is test execution and when will we start execution please send me one example for this question
How does the type system works when there is interoperability between a COM and .Net, i mean what exactly happens there
what is d main diff between the java and .net framework
what is woransient key word? how it is used in java
What is BASIS
how to check single or double byte in struts
hai i am mca 2009 fresher.please tell me which certification helps me to get an IT job faster which institute is good in hyderabad.please mail me to prasanna.1856@rediff.com
EXPLAIN UNARY OPEARATORS
what is diff bet ref variable & instance of class
what is the certificates in biztalk?
what is apt_dump_score in datastage where it is useful
What's the difference b/w Table & Templete in Smartform?