Skip to main content

Q) Explain about Boolean data type?



A)

In “c” language to represent “false” zero is used. Non-zero represent true. In java , to represent logical  “true” and “false“ separate data type is given which is  “Boolean “ type.

Ex:

Boolean b=false;

Or Boolean b=true;

Comments