Boolean vs boolean in Java

1.0K    Asked by JoanGill in Java , Asked on Apr 6, 2021

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?

Answered by Kato Saito

Your Answer

Interviews

Parent Categories