File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Java in General and the fly likes Can this be correct? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Java in General
Bookmark "Can this be correct?" Watch "Can this be correct?" New topic

Can this be correct?

Mike Gershman
Ranch Hand

Joined: Mar 13, 2004
Posts: 1272
I saw this unusual syntax for a Java bean class in a new SCWCD book, but I can't get it to compile. Can it be correct or is it just plain wrong?

Mike Gershman
SCJP 1.4, SCWCD in process
Paul Sturrock

Joined: Apr 14, 2004
Posts: 10336

Ditch the "chapter14." prefix and it should compile fine. I'm pretty sure full stops are not allowed in class names.

JavaRanch FAQ HowToAskQuestionsOnJavaRanch
Mike Gershman
Ranch Hand

Joined: Mar 13, 2004
Posts: 1272
I didn't think so either, but I want to be really sure. There are at least two examples of this syntax in the book (SCWCD Exam Study Kit, 2nd Edition).
Steven Bell
Ranch Hand

Joined: Dec 29, 2004
Posts: 1071
I don't see anything wrong with it other than the class name.
I agree. Here's the link:
subject: Can this be correct?
It's not a secret anymore!