Tuesday, November 10, 2015

How To Use Variables In Java Programs Post 8

Hi All...!

First of all I would like to say Sorry for not publishing post for month. Today I'm going to teach you how to use boolean data type in Java. boolean is one of a 8 basics, boolean data type only can hold two type of data "true" or "false". boolean data type is very useful when we us "if" conditions in Java to make decisions. In future posts I will teach you what are the if conditions and how to use them to decision making programs. Now just learn how to declare and initialize variables using boolean data type.

Let's do coding...!




As I shown in above two codes we can directly assign "true" and "false" values to boolean variable, There are another way to assign these two values to boolean variable we can use mathematical condition to assign "true" or "false" value to boolean variable.

Let's learn how to use mathematical conditions,


No comments:

Post a Comment