扫码下载编程狮APP
import java.util.concurrent.Callable; public class Main { public static void main(String args[]) { Callable<String> c = () -> "Hello you!"; try { System.out.println(c.call()); } catch (Exception e) { System.out.println(e.getMessage()); } } }
运行结果如下:
联系方式:
扫描二维码
下载编程狮App
扫码关注 领资料包