java - Boolean 型不可直接判断

如果定义了 
Boolean 

如图:

 

 那么不可判断

 

 如果输入的是 null ,则会报空指针异常 

posted @ 2022-08-30 09:40  岑惜  阅读(50)  评论(0)    收藏  举报