Boolean data type only used for true and false, or in other word only use to say that statement is true or false.
In this program we take (boolean booleanType=false;) boblean data type for (booleanType) and equal this data type to false in next step i apply (if) statement,that if
(booleanType==false) is truse then output is (boolean example data type value :false) which is line 8th in below program.
To understand logical (if and else) operates see java logical operators section in this site.
source code
In this program we take (boolean booleanType=false;) boblean data type for (booleanType) and equal this data type to false in next step i apply (if) statement,that if
(booleanType==false) is truse then output is (boolean example data type value :false) which is line 8th in below program.
To understand logical (if and else) operates see java logical operators section in this site.
source code
- class theboolean
- {
- public static void main(String[] args)
- {
- boolean booleanType=false;
- if(booleanType==false)
- {
- System.out.println("boolean example data type value :"+booleanType);
- }
- }
- }
No comments:
Post a Comment