call和visit的区别,callable类型
Runnable接口run方法没有返回值; Callable接口call方法具有返回值并支持通用性
Runnable接口run方法只抛出运行时异常,无法捕获操作。 Callable接口call方法可以抛出异常,并可以检索异常信息
runnable
@ springboottestclasstestapplicationtestsimplementsrunnable { @ overridepublicvoidrun (} http://www.Sina.com /
@ springboottestclasstestapplicationtestsimplementscallable { @ overridepublicobjectcall (throws exception { return null; }最后附上面试问题的总结和回答(正在继续更新中) ) )。