• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

doubt

 
meena latha
Ranch Hand
Posts: 219
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


if there is a question like this and the answer include
1.compile error
2.mbtt
3.matt
which one you will select.

[ February 28, 2005: Message edited by: ramya jp ]
[ March 01, 2005: Message edited by: ramya jp ]
 
ramaseshan T
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"mbtt" as it is holding the subclass object.
 
reshmi Bijo
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Ramya

The ans is 2)mbtt because the method invocation depends on the type of the object. Here the object is of class B.
 
meena latha
Ranch Hand
Posts: 219
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
why not compile error since it is having two public class....???
 
ankur rathi
Ranch Hand
Posts: 3830
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Waw , Good point ...

But it is not mentioned here that , this two classes are in same source file .
 
meena latha
Ranch Hand
Posts: 219
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi rathi...so if it not mentioned that they are in same source code file then whether we have to eliminate the compile error option???
Thanks in advance.
 
Jeroen Wenting
Ranch Hand
Posts: 5093
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
On the real exam you will know whether two pieces of code are in the same source by the line numbering.
This will also tell you whether any source you see is a complete class or a fragment.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic