Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Can this be correct?

 
Mike Gershman
Ranch Hand
Posts: 1272
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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?
 
Paul Sturrock
Bartender
Posts: 10336
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ditch the "chapter14." prefix and it should compile fine. I'm pretty sure full stops are not allowed in class names.
 
Mike Gershman
Ranch Hand
Posts: 1272
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 1071
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I don't see anything wrong with it other than the class name.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic