This week's book giveaway is in the Cloud/Virtualization forum.
We're giving away four copies of Learning OpenStack Networking: Build a solid foundation in virtual networking technologies for OpenStack-based clouds and have James Denton on-line!
See this thread for details.
Win a copy of Learning OpenStack Networking: Build a solid foundation in virtual networking technologies for OpenStack-based clouds this week in the Cloud/Virtualization 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:
  • Liutauras Vilda
  • Campbell Ritchie
  • Tim Cooke
  • Bear Bibeault
  • Devaka Cooray
Sheriffs:
  • Jeanne Boyarsky
  • Knute Snortum
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Ganesh Patekar
  • Stephan van Hulst
  • Pete Letkeman
  • Carey Brown
Bartenders:
  • Tim Holloway
  • Ron McLeod
  • Vijitha Kumara

OCP Java 8 SE Study Guide - Chapter 7- Concurrency (Sybex)  RSS feed

 
Ranch Hand
Posts: 51
1
Java Oracle
  • Likes 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

There is one typo in AmbiguousLambdaSample class example. The main method should throws IOException exception.

Thanks
 
author & internet detective
Sheriff
Posts: 38564
654
Eclipse IDE Java VI Editor
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Good find. Thanks for noticing. I've added it to the errata list. It's on page 343 of the print book as a reference to non Safari readers.
 
Greenhorn
Posts: 2
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Jeanne, hi Prateek,

I don't think "throws IOException" is necessary here, as none of the methods (useCallable, useSupplier and use) declare to throw an IOException. An IOException is thrown from the lambdas, but that doesn't matter.
 
Jeanne Boyarsky
author & internet detective
Sheriff
Posts: 38564
654
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Philippe,
It's hard to say because there are two lines that are flagged as not compiling. So what would be needed if it were to compile is subject to debate. Which means in this case, if adding the exception makes it clearer, I'm fine with it. (I agree it isn't actually needed).
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!