There are discussions around Integer
vs int
in Java. The default value of the former is null
while in the latter it's 0
. How about Boolean
vs boolean
?
A variable in my application can have 0
/1
values. I would like to use boolean
/Boolean
and prefer not to use int
. Can I use Boolean
/boolean
instead?
Question&Answers:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…