Java線程池中submit()和execute之間的區別?

一: submit()方法,能夠提供Future < T > 類型的返回值。 executor()方法,無返回值。html execute無返回值java public void execute(Runnable command) { if (command == null) throw new NullPointerException();//拋掉異常 int c = ctl.get(); if
相關文章
相關標籤/搜索