|
Do you need help with your Java programming?
Click here for instant help with your Java code. |
The boolean data type
The boolean type only have two possible values, true or false. In other languages a boolean value can be seen as an integer value, but Java is very strict when it comes to the boolean type. |
boolean value; if (value) { //Same as writing: if (value == true) //Do something } if (!value) { //Same as writing: if (value == false) //Do something } |
| Previous | Next | |
Tutorial Home | ||
| Do you know your Java? | |
| Take a Ten-Question-Java-Quiz! | |
Search for code examples on this site
