• 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:
  • Campbell Ritchie
  • Liutauras Vilda
  • Bear Bibeault
  • Jeanne Boyarsky
  • Tim Cooke
Sheriffs:
  • Knute Snortum
  • Junilu Lacar
  • Devaka Cooray
Saloon Keepers:
  • Ganesh Patekar
  • Tim Moores
  • Carey Brown
  • Stephan van Hulst
  • salvin francis
Bartenders:
  • Ron McLeod
  • Frits Walraven
  • Pete Letkeman

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: 38687
677
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: 38687
677
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: 116
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: 38687
677
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.
 
Consider Paul's rocket mass heater.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!