Win a copy of Kotlin for Android App Development this week in the Kotlin forum!
  • 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
  • Devaka Cooray
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Junilu Lacar
  • Paul Clapham
  • Knute Snortum
Saloon Keepers:
  • Ron McLeod
  • Tim Moores
  • Stephan van Hulst
  • salvin francis
  • Carey Brown
Bartenders:
  • Tim Holloway
  • Frits Walraven
  • Ganesh Patekar

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
Posts: 39129
723
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
Posts: 39129
723
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
Posts: 39129
723
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.
 
All of the world's problems can be solved in a garden - Geoff Lawton. Tiny ad:
RavenDB is an Open Source NoSQL Database that’s fully transactional (ACID) across your database
https://coderanch.com/t/704633/RavenDB-Open-Source-NoSQL-Database
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!