This week's giveaway is in the Spring forum.
We're giving away four copies of REST with Spring (video course) and have Eugen Paraschiv on-line!
See this thread for details.
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

Win a copy of REST with Spring (video course) this week in the Spring forum!
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!