toInt method
Converts the boolean value to an integer.
Returns 1
if the value is true
, and 0
if the value is false
.
Implementation
int toInt() {
return this ? 1 : 0;
}
Converts the boolean value to an integer.
Returns 1
if the value is true
, and 0
if the value is false
.
int toInt() {
return this ? 1 : 0;
}