Primitive Data Types – Boolean

Primitive Data Types in Java – Boolean

Primitive data types are very important in any language. Without this data types we cannot understand programming language. We can also called primary data types in java. In this primitive data types we found four types of family like Integer, Float, Character and Boolean. And these families have their own children like Integer [byte, short, int and long], Float [float, double], Character [char].


Data Type Details

NoData TypesSizeValues
1boolean1 byteTrue / False


Program in True False Data Types:

Title: Primary Data Type – True False Value

class data4


public static void main(String args[])


boolean b = true;


if(b) // Value of b is true so if condition will be true.
System.out.println(“Hello Java”);





Hello Java


Video also available on YouTube




If you have problem on this blog, you can directly comment or subscribe on website.

Primitive Character

593total visits,2visits today


Hello, I am Maddy a Java blogger, trainer and developer

Related articles

Comments are closed.