Top "Boolean" questions

A Boolean data type is a data type with only two possible values: true or false.

Why is the ternary operator used to define 1 and 0 in a macro?

I'm using an SDK for an embedded project. In this source code I found some code which at least I …

c++ c boolean ternary-operator
Boolean.valueOf() produces NullPointerException sometimes

I have this code: package tests; import java.util.Hashtable; public class Tests { public static void main(String[] args) { Hashtable&…

java nullpointerexception boolean
Bitarray VS bool[]

I expected to find a existing question here on SO about this but i didn't. What is the advantage of …

c# boolean bitarray
Logical operator || in javascript, 0 stands for Boolean false?

I happened to know the following code Here is the code, and very simple: var test = 0 || -1 ; console.log(test); …

javascript boolean logical-operators or-operator
Is Java 8 missing an OptionalBoolean?

As a primitive version of Optional*, Java 1.8 provides OptionalInt, OptionalLong and OptionalDouble. But I cannot find the equivalent OptionalBoolean class. …

java boolean monads java-8 optional
Combine logical vectors in list using logical OR

Question How do I effectively combine logical vectors across the list using elementwise comparisons with logical OR (|). The result should …

r list boolean boolean-logic
C# bitwise equal bool operator

Boolean in C# are 1 byte variables. And because bool are shortcuts for the Boolean class, I would expect that the &…

c# boolean bitwise-operators boolean-logic
How to invert numpy.where (np.where) function

I frequently use the numpy.where function to gather a tuple of indices of a matrix having some property. For …

python numpy boolean where indices
short short int in c?

I'm trying to squeeze as much out of my memory as possible. I have a matrix of 4.9999995e13 ints but …

c char boolean int short
What is the difference between @YES/@NO and YES/NO?

In Objective-c what is the difference between @YES/@NO and YES/NO? What types are used for each?

objective-c boolean objective-c-literals