• Post Reply Bookmark Topic Watch Topic
  • New Topic

Collectors.mapping method  RSS feed

 
Alexandru Puiu
Greenhorn
Posts: 22
2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi guys,

Can someone please help me understand why do I get an exception here:



My compiler doesn't find anything wrong, but I get the following exception:

 
Alexandru Puiu
Greenhorn
Posts: 22
2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Already found the answer! Thank's in advance!
 
Campbell Ritchie
Marshal
Posts: 56600
172
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
That isn't an exception; that is a compile time error. Please show us how you corrected it.
 
Piet Souris
Master Rancher
Posts: 2044
75
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What, I wonder, is unclear about the error report?  

@OP
you can get rid of the Optional<Character> if you so wish, by using 'collectingAndThen'. For instance:
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!