Boolean represents just two values, i.e. 'true' or 'false'.
A 'Boolean' Data Type can accept only 'true' or 'false'.
fun main(){ var x: Boolean = true var y: Boolean = false println(x) println(y) }
So, in the above code, we have created a variable named 'x' of 'Boolean' data type and initialised it with value 'true'.
And created one more variable called 'y' of 'Boolean' data type and initialised it with value 'false'.
But if we want to initialise a 'Boolean' type variable with anything other than 'true/false',it would end up with an error.