如何将lamda表达式 改为普通的java表达式

executorService.submit(()->{
spiderService.spiderData(SysConstant.BASE_URL,params);
countDownLatch.countDown();
});
将上面这段代码转化为普通的java表达式
慕后森
浏览 2124回答 2
2回答

慕标琳琳

voidsubmitFunction(){spiderService.spiderData(SysConstant.BASE_URL,params);countDownLatch.countDown();}executorService.submit(submitFunction);

桃花长相依

executorService.submit(new方法参数类型(){void接口名(){spiderService.spiderData(SysConstant.BASE_URL,params);countDownLatch.countDown();}});
打开App,查看更多内容
随时随地看视频慕课网APP

相关分类

JavaScript