File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Developer Certification (SCJD/OCMJD) and the fly likes B&S: Data Constructors Signature Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Developer Certification (SCJD/OCMJD)
Bookmark "B&S: Data Constructors Signature" Watch "B&S: Data Constructors Signature" New topic

B&S: Data Constructors Signature

Laura Pecoraro
Ranch Hand

Joined: Mar 31, 2009
Posts: 45
Hi all...

I have a doubt about my data constructors signature... in the Sun specification don't say about this constructors, and then, I implements this:

This is a problem for automatic test???

Thanks Laura

Roel De Nijs

Joined: Jul 19, 2004
Posts: 8364

My data-constructor is

So if your constructor is a problem, then my constructor is too. So i don't think you have to worry about passing a String-argument to your constructor. In my assignment nothing is said about Data having a no-arg public constructor (like the must-requirement for RecordNotFoundException), just that Data must implement sun's interface. So don't worry at all!

SCJA, SCJP (1.4 | 5.0 | 6.0), SCJD
Roberto Perillo

Joined: Dec 28, 2007
Posts: 2271

No need to worry, guys. My constructor is just like Roel's... Laura, I am pretty sure I have seen other people doing just like you did, and were successful.

Cheers, Bob "John Lennon" Perillo
SCJP, SCWCD, SCJD, SCBCD - Daileon: A Tool for Enabling Domain Annotations
Laura Pecoraro
Ranch Hand

Joined: Mar 31, 2009
Posts: 45
Thanks friends... to my great relief

I agree. Here's the link:
subject: B&S: Data Constructors Signature
jQuery in Action, 3rd edition