• 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
  • Tim Cooke
  • paul wheaton
  • Paul Clapham
  • Ron McLeod
Sheriffs:
  • Jeanne Boyarsky
  • Liutauras Vilda
Saloon Keepers:
  • Tim Holloway
  • Carey Brown
  • Roland Mueller
  • Piet Souris
Bartenders:

Sybex:Java 8 OCA/OCP Practice Tests Chapter 23 question 58 typo page 559

 
Ranch Hand
Posts: 216
11
  • Likes 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Sybex: Java 8 OCA/OCP Practice Tests Chapter 23(OCP Practice Exam) question 58 typo in explanation page 414 explanation at page 559

58. C. The filter() method passes two of the three elements of the stream through to the terminal operation.
This is "redundant" since the terminal operation checks the same Predicate.

TYPO: It is NOT redundant because omitting "filter(pred)" gives false at allMatch.





by alinvlad05
 
Marshal
Posts: 28425
102
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Vlad Alin wrote:58. C. The filter() method passes two of the three elements of the stream through to the terminal operation.
This is "redundant" since the terminal operation checks the same Predicate.



Indeed, as that example shows: It's true that the two methods check the same Predicate, but they apply it to different elements of the Stream.
 
author & internet detective
Posts: 42162
937
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
Have two cows. This error was in all three of our practice exam books (Java 8, 11, and 17) and you were the first to notice. You are absolutely right!

I recorded it in all three errata pages crediting you.
 
reply
    Bookmark Topic Watch Topic
  • New Topic