aspose file tools*
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes Doubt in K&B SCJP 5: topic enum declaration Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "Doubt in K&B SCJP 5: topic enum declaration" Watch "Doubt in K&B SCJP 5: topic enum declaration" New topic
Author

Doubt in K&B SCJP 5: topic enum declaration

Chris Goad
Greenhorn

Joined: Jul 26, 2006
Posts: 16
Pages 76 and 79. The answer to question 8 indicates that it compiles and gives output without any error, but Line 5 does not have a semicolon.

On page 65, the code example indicates that 'the semicolon is REQUIRED when you have a body'

Which is correct? These seem to contradict.

Thanks,
Chris
Chris Goad
Greenhorn

Joined: Jul 26, 2006
Posts: 16
How's this :-) Sorry, I had not read that little snippet.

Chris
Chris Goad
Greenhorn

Joined: Jul 26, 2006
Posts: 16
With the exception of correcting my sign in name, has anyone had a chance to look at this one? As noted before, these seems contradictory.

Thanks for any help.

Chris
Henry Wong
author
Sheriff

Joined: Sep 28, 2004
Posts: 18101
    
  39

It may help if you provided an excerpt. As written, you are limited to only people who has a copy of the book.

Henry
[ August 15, 2006: Message edited by: Henry Wong ]

Books: Java Threads, 3rd Edition, Jini in a Nutshell, and Java Gems (contributor)
Bert Bates
author
Sheriff

Joined: Oct 14, 2002
Posts: 8764
    
    5
Hey Chris,

In general on JavaRanch, it's acceptable to post code snippets from a book or a mock exam for the purposes of discussion. What the authors of the material like to see is an acknowledgment of the source of the code snippet. So you might say: "This is from Whiz-labs...."

hth,

Bert

p.s. BTW, I'm not being obtuse here (wow - I've used "obtuse" twice in the same morning ), Kathy and I have a personal policy that we like ranchers to hash out technical questions before we do; it gives everyone additional "learning opportunities"


Spot false dilemmas now, ask me how!
(If you're not on the edge, you're taking up too much room.)
Mandeep kaur
Greenhorn

Joined: Aug 13, 2006
Posts: 8
hello
i think you have some confusion,i have checked from book.when author says that code block must end with semicolon he is talking about code block that defines body of constant,not body of enum.and in question no 8,line 5 ,there should be no semicolon as body of enum is ending there
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Doubt in K&B SCJP 5: topic enum declaration
 
Similar Threads
Help with book exame numbers
Cannot find symbol class
Java Round-Up game
enums
JQuery - jquery-1.6.2.min.js errors out