Hi! I don't get this part
events.forEach( (k, v)->processEvents(v));
The lambda expression being passed to forEach is syntactically correct. However, the type of v is Object and there is no processEvents method available that can accept an Object.
Why v is Object?
About Question enthuware.ocpjp.i.v11.2.3086 :
Moderator: admin
-
- Posts: 7
- Joined: Tue Aug 20, 2019 1:32 am
- Contact:
-
- Site Admin
- Posts: 10388
- Joined: Fri Sep 10, 2010 9:26 pm
- Contact:
Re: About Question enthuware.ocpjp.i.v11.2.3086 :
Type of v is Object because the type of "events" is non-generic Map (i.e. without any generic type applied to it) and therefore Map's key and value are Object and Object respectively.
Who is online
Users browsing this forum: No registered users and 9 guests