*
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes Need a link to errata for Java 6 study Guide--Sierra and Bates Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "Need a link to errata for Java 6 study Guide--Sierra and Bates " Watch "Need a link to errata for Java 6 study Guide--Sierra and Bates " New topic
Author

Need a link to errata for Java 6 study Guide--Sierra and Bates

Jennifer Schwartz
Ranch Hand

Joined: Jan 12, 2011
Posts: 46

Anyone know of a url for this???

OR if you have the book handy:

pg 64 on enums....

wondering if there is an error in that each instance of the class Coffee should have an enum declared. Only BIG and OVERWHELMING are declared...no HUGE?

Hareendra Reddy
Ranch Hand

Joined: Jan 09, 2011
Posts: 173

Hello Jennifer ,
You can visit this thread for errata...

Jennifer Schwartz
Ranch Hand

Joined: Jan 12, 2011
Posts: 46

Thanks!! I still think pg 64 is missing that, but I will def bookmark that pg
Hareendra Reddy
Ranch Hand

Joined: Jan 09, 2011
Posts: 173

Hello Jennifer,

I didn't find any mistake in page:64,
could you elaborate more !!

Every Coffee type object have an enum reference variable and
for each loop in main method uses static values method ...
Jennifer Schwartz
Ranch Hand

Joined: Jan 12, 2011
Posts: 46



"Which produces:
8
BIG 8
HUGE 10
OVERWHELMING 16"

Note: I didn't include all the curly braces..etc. just copy and pasted for sake of time. My question is that the comment states that EACH instance of Coffee has an enum?? In this code (straight from the book), I only see the BIG and OVERWHELMING referenced here or whatever it's called..lol Where is HUGE??
Shouldn't HUGE be included as follows:


**OR rather, HUGE should be drink2 and OVERWHELMING drink3.
Hareendra Reddy
Ranch Hand

Joined: Jan 09, 2011
Posts: 173

Comment just says each Coffee type instance have CoffeeSize type variable..

Actually we are using static values method which returns an array of corresponding type
which is iterated through in the above code...
It is not related with any instancd of Coffee type.

HTH
Jennifer Schwartz
Ranch Hand

Joined: Jan 12, 2011
Posts: 46

Thanks, I think I'll understand it better when I get into more study content about static in general.
Hareendra Reddy
Ranch Hand

Joined: Jan 09, 2011
Posts: 173

This code alone prints the output:

for(CoffeeSize cs: CoffeeSize.values())
System.out.println(cs + " " + cs.getOunces()); }

BIG 8
HUGE 10
OVERWHELMING 16

values method returns arrays of all existing CoffeSize type enums i.e BIG ,HUGE and OVERWHELMING
then in the println you can use that to invoke method etc..

Actually i want you to get understood...
Jennifer Schwartz
Ranch Hand

Joined: Jan 12, 2011
Posts: 46

ohhhh ok!! Now that I understand! So, because of the value method, it will return all of the enums based on their constructors (returns the function itself) and then for viewing them on screen you would invoke them in the println statement?

Sorry about the vocab...I can't seem to get into my brain the terminology...invoke, call, instantiate, declare..etc etc. haha I know in my head what or why (in most cases) just not how to correctly term it. Kind of my abstract way of understanding and hard to put into words.
dennis deems
Ranch Hand

Joined: Mar 12, 2011
Posts: 808
Hareendra Reddy wrote:Hello Jennifer ,
You can visit this thread for errata...



She is asking about SCJP 6, that link is for SCJP 5.
Jennifer Schwartz
Ranch Hand

Joined: Jan 12, 2011
Posts: 46

Where's the link for 6? I've been using that one! lol
Bert Bates
author
Sheriff

Joined: Oct 14, 2002
Posts: 8813
    
    5
Hi Jennifer,

We're way overdue. We really should have an official errata list by now.

For now, this thread is being used to compile a tentative list:

http://www.coderanch.com/t/467890/java-programmer-SCJP/certification/Compiling-errata-SCJP

hth,

Bert


Spot false dilemmas now, ask me how!
(If you're not on the edge, you're taking up too much room.)
Jennifer Schwartz
Ranch Hand

Joined: Jan 12, 2011
Posts: 46

got it..thanks for the info and the link.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Need a link to errata for Java 6 study Guide--Sierra and Bates