File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes doubt Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "doubt" Watch "doubt" New topic


meena latha
Ranch Hand

Joined: Jan 24, 2005
Posts: 219

if there is a question like this and the answer include
1.compile error
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

Joined: Feb 17, 2005
Posts: 30
"mbtt" as it is holding the subclass object.

Ramaseshan T<br />SCJP 1.4
reshmi Bijo

Joined: Feb 28, 2005
Posts: 2
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

Joined: Jan 24, 2005
Posts: 219
why not compile error since it is having two public class....???
ankur rathi
Ranch Hand

Joined: Oct 11, 2004
Posts: 3830
Waw , Good point ...

But it is not mentioned here that , this two classes are in same source file .
meena latha
Ranch Hand

Joined: Jan 24, 2005
Posts: 219
hi 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

Joined: Oct 12, 2000
Posts: 5093
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.

I agree. Here's the link:
subject: doubt
It's not a secret anymore!