Win a copy of The Journey To Enterprise Agility this week in the Agile and Other Processes forum! And see the welcome thread for 20% off.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Jeanne Boyarsky
  • Liutauras Vilda
  • Campbell Ritchie
  • Tim Cooke
  • Bear Bibeault
Sheriffs:
  • Paul Clapham
  • Junilu Lacar
  • Knute Snortum
Saloon Keepers:
  • Ron McLeod
  • Ganesh Patekar
  • Tim Moores
  • Pete Letkeman
  • Stephan van Hulst
Bartenders:
  • Carey Brown
  • Tim Holloway
  • Joe Ess

Errata for OCP: Oracle Certified Professional Java SE 8 Programmer II Study Guide -page 136 (Sybex)  RSS feed

 
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I think  the add and offer method's descriptions should be same for ArrayDequeue  in the table 3.5 ?

Because both of two methods invoke the addLast(e) method. And also offer method can throw an exception..
 
author & internet detective
Marshal
Posts: 38502
653
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Erdem,
I've added the fact that offer can throw an exception to the errata. Thanks for noticing that.
 
Ranch Hand
Posts: 74
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I disagree with that one, since method offer(e) doesn't throw an exception --> see API Doc: Interface Queue<E>
Summary of Queue methods:
                Throws exception     Returns special value
Insert       add(e)                     offer(e)
Remove    remove()                 poll()
Examine   element()                peek()

Furthermore add(e) invokes addLast(e), while offer(e) invokes offerLast(e).
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 38502
653
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I don't know what I was thinking when I logged the errata. As you noted the JavaDoc clearly says that. Removed the errata.
 
Ranch Hand
Posts: 115
11
Eclipse IDE Hibernate Java Netbeans IDE Postgres Database Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Jeanne Boyarsky wrote:I don't know what I was thinking when I logged the errata. As you noted the JavaDoc clearly says that. Removed the errata.



Hello Jeanne. I was just about to create a topic about this.
I believe the errata wasn't removed yet, right?
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 38502
653
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

João Victor Gomes wrote:

Jeanne Boyarsky wrote:I don't know what I was thinking when I logged the errata. As you noted the JavaDoc clearly says that. Removed the errata.



Hello Jeanne. I was just about to create a topic about this.
I believe the errata wasn't removed yet, right?


I apparently had some "press save after making change" troubles. Now it is really removed from the list.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!