Читать книгу OCP Oracle Certified Professional Java SE 17 Developer Study Guide - Jeanne Boyarsky - Страница 130

Understanding Java Operators

Оглавление

Before we get into the fun stuff, let's cover a bit of terminology. A Java operator is a special symbol that can be applied to a set of variables, values, or literals—referred to as operands—and that returns a result. The term operand, which we use throughout this chapter, refers to the value or variable the operator is being applied to. Figure 2.1 shows the anatomy of a Java operation.


FIGURE 2.1 Java operation

The output of the operation is simply referred to as the result. Figure 2.1 actually contains a second operation, with the assignment operator (=) being used to store the result in variable c.

We're sure you have been using the addition (+) and subtraction (-) operators since you were a little kid. Java supports many other operators that you need to know for the exam. While many should be review for you, some (such as the compound assignment operators) may be new to you.

OCP Oracle Certified Professional Java SE 17 Developer Study Guide

Подняться наверх