Win a copy of React Cookbook: Recipes for Mastering the React Framework this week in the HTML Pages with CSS and JavaScript 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Rob Spoor
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • Junilu Lacar
  • Tim Cooke
Saloon Keepers:
  • Tim Holloway
  • Piet Souris
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
Bartenders:
  • Frits Walraven
  • Himai Minh

OCP Java SE 11 Programmer I Study Guide (Sybex 816) Errata Chapter 3 no Collection.replace()

 
Bartender
Posts: 1035
31
Eclipse IDE Postgres Database C++ Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
On page 133, we find, in the description for .replace() and .replaceAll() on Map interface:

These methods are similar to the Collection version except a key is involved.



Seemingly minor, but a major objective of this chapter is to remember which Interfaces and Classes covered on the exam contain which methods, so not so minor:
Collections helper class does have a replaceAll() method

Additionally, List interface has a .replaceAll() method, and has a way to replace things at an index called .set() (which you could forget and refer to as .replace(), ouch!!)

These are all things in the core of what I would want to make sure I won't be tripped up on at exam-time regarding Collection types/interfaces and method calls.

I would make that sentence more specific or remove it entirely, as it is too easy to "remember" methods on classes or interfaces where they don't exist as it is.

 
author & internet detective
Posts: 40722
827
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Well, that's why it says "similar". But noted to see if we want to re-word it.
 
Liar, liar, pants on fire! refreshing plug:
the value of filler advertising in 2021
https://coderanch.com/t/730886/filler-advertising
reply
    Bookmark Topic Watch Topic
  • New Topic