java1.8新特性(optional 使用)

    常常在程序中出現 java.lang.NullPointerException  爲了不  報錯,老是要進行一些 是否爲null 的if else 判斷 ,1.8 能夠使用optional 類 來簡化處置    optional :A container object which may or may not contain a non-null value.:可能包含也可能不包含非空值的
相關文章
相關標籤/搜索