replacement of lambda expression in java 1.7 -


 timer.scheduleatfixedrate(() -> sendtimetoall(session),0,1,timeunit.seconds); 

this expression used in java 8, how write in java 7 version

the lambda () -> sendtimetoall(session) nothing more direct implementation of runnable-interface.

so () -> sendtimetoall(session) equivalent this

new runnable() {     public void run() {         sendtimetoall(session);     } } 

Comments

Popular posts from this blog

python - Selenium remoteWebDriver (& SauceLabs) Firefox moseMoveTo action exception -

html - How to custom Bootstrap grid height? -

transpose - Maple isnt executing function but prints function term -