I have started learning java. I am learning Boolean
in java. Boolean has two types, true
& false
. In C there was nothing like this. We have either 0
or 1
. So, I want to know how does true
and false
work? How is it stored in memory? Does it require 1 bit space or more? Is it some type of string? For example,
class Test {
public static void main(String[] args) {
System.out.println( 5 > 6 );
}
}
I get :
false
So, what is the size of false
? It looks like a string in java.