Integer lengthOrNull = strOpt.map(String::length).orElse(null);. Optional 的其他方法在特定场景也很实用 ...
確定! 回上一頁