Win a copy of Classic Computer Science Problems in Swift this week in the iOS forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Sybex OCA Java 8 Study Guide: assessment test answer to question 17  RSS feed

 
Greenhorn
Posts: 24
IntelliJ IDE Java Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi.

Introduction, page XLII.

Autoboxing works for collections not inferring predicates.


Maybe "not" should be "of"?
The point is that lambda expression without declared types works with autoboxing, but it's ompile time error to explicitly declare primitive int instead of Integer, right?
 
author & internet detective
Marshal
Posts: 38152
617
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Confirmed and added to the errata. Good eye!

And you are correct about the point we were trying to make; if one lists the type, it needs to match.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!