import java.util.concurrent.StructuredTaskScope; /** Valid on JDK 25 and 26 (join() threw only InterruptedException). On 27 and 28 join() can throw ExecutionException. */ public class MissingCatch { static String handle() throws InterruptedException { try (var scope = StructuredTaskScope.open()) { var user = scope.fork(() -> "Alice"); scope.join(); return user.get(); } } public static void main(String[] args) throws Exception { System.out.println(handle()); } }