aspose file tools*
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes Mock question 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 "Mock question doubt..." Watch "Mock question doubt..." New topic
Author

Mock question doubt...

Bram Maes
Ranch Hand

Joined: Sep 27, 2006
Posts: 32


The correct answer is "This doesn't compile".
This invocation will search for a function named test. It does not invoke the overloaded test() constructor.

I don't get this. Why is that ?? How can you do what's meant to do here ?

Thanks.


SCJP 5.0, SCEA part I
Anand Loni
Ranch Hand

Joined: Jan 20, 2006
Posts: 150
Hi,

First statement in Constructor can only be:

1) Call to superclass's constructor by super call.
2) Call overloaded constructor using this call.

Thats why its will search for method named same as class name.

Regards,
Anand


~ Anand,
SCJP 1.5, SCWCD 1.5
Bram Maes
Ranch Hand

Joined: Sep 27, 2006
Posts: 32
So this(2) should work then ?
Max Habibi
town drunk
( and author)
Sheriff

Joined: Jun 27, 2002
Posts: 4118
yup


Java Regular Expressions
Bram Maes
Ranch Hand

Joined: Sep 27, 2006
Posts: 32
These are the kind of questions I hate. Really those subtle differences. Half a second losing your attention and bang...

And of course thanks a lot for the clarification!
[ October 27, 2006: Message edited by: Bram Maes ]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Mock question doubt...