Writing Java code
Now that we have discussed all the relevant OOP features of Java, we can start writing classes that actually do something. This part of the chapter will discuss some topics that will guide you in this process:
- Operators
- Plain Old Java Object
- Arrays
- Generics and Collections
- Looping
- Exceptions
- Threads
- Lambdas
Operators
Some of the most important operators of the Java language are summed up in this table. Note that Java knows more operators than the ones listed here. Operators that are very common in all other popular programming languages, such as +, -, >, >=, <, and <=, are not listed here:
Operator | Description |
| These return the value, then increase or decrease the value |
| These increase or decrease the value, then return the new value |
| This is the logical NOT operator |
| This refers to the remainder (integer) of a division |
| This returns a Boolean indicating whether the passed object is an instance of the specified class or interface |
| These refer... |