• 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 CSG 11” Chapter 12 Page 534.

 
Greenhorn
Posts: 1
1
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The topic "Restrictions on Using var in the Parameter List" proposes to evaluate if some lambda expressions does compile or not.

At line 4, the expression "var w -> 99" does not compile. But the book says that it is "because parentheses, (), are required when using the parameter name.".

I disagree with the ending, as parameter names are always mandatory. A better explanation would be  "because parentheses, (), are required when using the parameter **type**.".

Thanks for your attention!
 
author & internet detective
Posts: 42160
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
Confirmed and added to the errata crediting you. Thanks!
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic