• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Sybex 816. Chapter 2. Page 193. Potential typo

 
Greenhorn
Posts: 3
1
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello, Jeanne and Scott, I think there might be a typo:

The @SafeVargs marker annotation indicates that a method does not perform any potential unsafe operations on its varargs parameter.

Selikoff, Scott. OCP Oracle Certified Professional Java SE 11 Programmer II Study Guide (p. 193). Wiley. Kindle Edition.  



Returning to @SafeVargs, the annotation is used to indicate to other developers that your method does not perform any unsafe operations.

Selikoff, Scott. OCP Oracle Certified Professional Java SE 11 Programmer II Study Guide (p. 193). Wiley. Kindle Edition.  



@SafeVargs might be @SafeVarargs?
 
Marshal
Posts: 79395
377
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thank you for providing complete information about the book. If you look here, you will find errata, not including what you mentioned, so you would appear to have found a “new” error. Please wait for Jeanne to check this thread.
 
author & internet detective
Posts: 41905
909
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
Pavel,
Confirmed and added to the errata. I also gave you a cow because I had to read your post 5 times to see what was wrong.

Yes, it should definitely be @SafeVarargs!
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic