• 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
  • Tim Cooke
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • Junilu Lacar
  • Rob Spoor
  • Jeanne Boyarsky
Saloon Keepers:
  • Stephan van Hulst
  • Carey Brown
  • Tim Holloway
  • Piet Souris
Bartenders:

Sybex 816 Java OCP 11 Programmer II Study Guide Set.of Errata

 
Ranch Hand
Posts: 493
9
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Like List, you can create an immutable Set in one line or make a copy of an existing one.



VitalSource page 123 produces:
Exception in thread "main" java.lang.IllegalArgumentException: duplicate element: o
 
Marshal
Posts: 77546
372
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Yes, that behaviour is specified in the API documentation. I presume you have checked to confirm that is a new erratum.
 
author & internet detective
Posts: 41578
881
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
Added to errata. I can't believe that snuck into the book!

I even wrote a blog post last year when I discovered that behavior.
 
Charles O'Leary
Ranch Hand
Posts: 493
9
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Jeanne BoyarskyI even [url=https://www.selikoff.net/2019/05/26/did-you-know-set-of-does-that/ wrote:wrote a blog post last year[/url] when I discovered that behavior.


Nice write up.  Thanks!
 
Yeast devil! Back to the oven that baked you! And take this tiny ad too:
The Low Tech Laboratory Movie Kickstarter is LIVE NOW!
https://www.kickstarter.com/projects/paulwheaton/low-tech
reply
    Bookmark Topic Watch Topic
  • New Topic