File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes Works Too: Answer to K&B Self Test Chapter 2 No. 7 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 "Works Too: Answer to K&B Self Test Chapter 2 No. 7" Watch "Works Too: Answer to K&B Self Test Chapter 2 No. 7" New topic
Author

Works Too: Answer to K&B Self Test Chapter 2 No. 7

Katrin Lüthi
Greenhorn

Joined: Aug 22, 2008
Posts: 7
Actually, you can also (additionally to what is stated as correct answer) put in a call to "this();" as first line in the constructor public AgedP(int x).
All the components (this, (, ), are present for choosing and the space is provided, too.

It is not necessary, but doesn't do any harm and the question does not say "only chose the minimal variant". In fact, I have even heard people say it is good practice to link different constructors, so that they do not duplicate code used in another one already. If the exam has questions like this, are such things marked false?
Bert Bates
author
Sheriff

Joined: Oct 14, 2002
Posts: 8883
    
    5
Hey Kat,

The real exam no longer has any "fill in the blank" questions. (It used to.) In the book we do a couple of these in an attempt to roughly emulate the so-called "drag and drop" questions that ARE on the exam. The real "drag and drop" questions require that you fill every box, every time.

hth,

Bert


Spot false dilemmas now, ask me how!
(If you're not on the edge, you're taking up too much room.)
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Works Too: Answer to K&B Self Test Chapter 2 No. 7