The boolean is the only logical primitive type in Java, meaning it is capable of helping you perform logical operations. boolean The only type used to represent true and false values in Java is boolean . The word is written out completely, not shortened to bool as in C++, C#, and other languages. Possible values are true or false . Default value is false . Note that in Java, the boolean values are literals: you may not substitute a 0 for false or a 1 for true as in other languages. If you are in the habit of using 0 and 1 in this way, break it quick. As a side note, if you are in the habit of returning -1 from a method to indicate a non-standard state, break that habit too. Java has a robust exception handling facility for such business. So, yeah. I guess that's all I want to say about primitives right now. Let's get on to more interesting things. Like grouting some tile. Have you ever been forced to clean the teeth on your dad's rusting rakes all day on a Saturday? Me neither . But man that sounds boring. |