import java.util.Optional; Optional t ; 判断是否为空:t.isPresent(); — true 不为空 false 为空; 返回的时候也可以使用:Optional.of(T);构建 返回