answersLogoWhite

0

A Boolean is a variable that can hold the value true or false. In most implementations, true is the all-ones bit pattern while false is the all-zeroes bit pattern. As a signed integer in twos-complement notation these patters represent -1 and 0 respectively. However, numeric values can and often do implicitly convert to a Boolean such that non-zero values are always true while zero is always false. For typical container objects (including strings), an empty container implicitly converts to false while a non-empty container implicitly converts to true.

User Avatar

Wiki User

8y ago

What else can I help you with?