2.6. Summary

In this chapter, we started with the primitive data types in Java, including examples of where to use each of the kinds and their literal values. We also categorized the primitives into character type, integer type, and floating type. Then we covered the ingredients of valid and invalid Java identifiers. We covered the differences between primitive and reference types.

We discussed the operators used to manipulate primitives (limited to the ones required for the OCA Java SE 8 Programmer I exam). We also covered the conditions in which a particular operator can be used. For example, if you wish to check whether a set of conditions is true, you can use the logical operators. It’s also important to understand the operand types that can be used for each of these operators. For example, you can’t use boolean operands with the operators >, >=, =<, and <.

We discussed the wrapper classes, including their class hierarchy, creating their instances, retrieving primitive values stored by wrapper class instance, parsing string values to primitive types, and comparing instances of wrapper classes. At the end of the chapter, we covered autoboxing and unboxing.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.116.80.45