Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

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

 
Jennifer Schwartz
Ranch Hand
Posts: 46
Firefox Browser Java Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 173
Fedora Firefox Browser Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello Jennifer ,
You can visit this thread for errata...

 
Jennifer Schwartz
Ranch Hand
Posts: 46
Firefox Browser Java Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks!! I still think pg 64 is missing that, but I will def bookmark that pg
 
Hareendra Reddy
Ranch Hand
Posts: 173
Fedora Firefox Browser Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 46
Firefox Browser Java Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


"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
Posts: 173
Fedora Firefox Browser Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 46
Firefox Browser Java Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks, I think I'll understand it better when I get into more study content about static in general.
 
Hareendra Reddy
Ranch Hand
Posts: 173
Fedora Firefox Browser Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 46
Firefox Browser Java Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 808
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 46
Firefox Browser Java Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Where's the link for 6? I've been using that one! lol
 
Bert Bates
author
Sheriff
Posts: 8898
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Jennifer Schwartz
Ranch Hand
Posts: 46
Firefox Browser Java Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
got it..thanks for the info and the link.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic