In the previous article, I have explained about assigning different types of literals to the double data type variable.
In this article, I am going to explain about assigning different types of literals to the boolean data type variable.
Java for Testers – Assigning different types of literals to the boolean data type variable
boolean data type variable only allows you to assign the boolean values (i.e. either true or false).
But on trying to assign the literals other than boolean type, Java will give you a compiler error.
The below are the screenshots of the compiler errors displayed on assigning the literals other than boolean type:
Here conclude this article on assigning the different types of Literals to the boolean data type variable in Java.
In the next article, I will explain the remaining things about data types.
- > To learn more about Java, continue to the next post (Click on Next Post link below)
- > Check complete Java Tutorial Contents here (Click here)
Please leave your questions/comments/feedback below:
Happy Learning ?
Arun Motoori (www.QAFox.com)
On a mission to help the Testing Community in all possible ways.