Since Java 8, the JDK offers a wrapper type named Optional . With it, we can rewrite the above null-checking code as: var option = Optional.
確定! 回上一頁