Skip to content
Advertisement

how to add synchronization in following lambda exp?

JavaScript

Can synchronized blocks be used for some of the code blocks written in lambda expression . With respect to the following code snippet :

Advertisement

Answer

It is possible to use synchronized blocks inside a Java Lambda Expression and inside anonymous classes.

Note: You have forgotten to add code snippet as no code snippet is visible in your code , So I ma adding my own code snippet to make clear my point.

JavaScript
User contributions licensed under: CC BY-SA
8 People found this is helpful
Advertisement