When should null values of Boolean be used?

前端 未结 14 2358
心在旅途
心在旅途 2020-12-04 07:32

Java boolean allows values of true and false while Boolean allows true, false, and null. I have

14条回答
  •  [愿得一人]
    2020-12-04 07:53

    Boolean can be very helpful when you need three state. Like in software testing if Test is passed send true , if failed send false and if test case interrupted send null which will denote test case not executed .

提交回复
热议问题