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;

System.out.println(b);

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

}

}

Output:

true

Hello Java

 

Video also available on YouTube

 

 

[sbscrbr_form]

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

Primitive Character

Share and Enjoy

  • Facebook
  • Twitter
  • Delicious
  • LinkedIn
  • StumbleUpon
  • Add to favorites
  • Email
  • RSS

283total visits,1visits today


mayank

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

Related articles

Leave a Reply

Your email address will not be published. Required fields are marked *

Your comments (*)

Name (*)

Your full name please.

Email address (*)

Used for gravatar.

Website

Link back if you want.

Enter Captcha Here :*

Reload Image

EmailEmail
PrintPrint