• 2022-06-08
    中国大学MOOC: Which can fill in the blank so this code outputs Caught it?public class Tenth { public static void main(String[] args) { Optional opt = Optional.empty(); try { apply(opt); } catch (IllegalArgumentException e) { System.out.println(Caught it); } } private static void apply(Optional opt) { opt._____________(IllegalArgumentException::new); }}
  • 举一反三