From the course: Java 8+ Essential Training: Syntax and Structure

Unlock the full course today

Join today to access over 22,500 courses taught by industry experts or purchase this course individually.

More about Java operators

More about Java operators - Java Tutorial

From the course: Java 8+ Essential Training: Syntax and Structure

Start my 1-month free trial

More about Java operators

- [Instructor] Java is a C-style language, that means it shares a lot of syntax with C, and specifically it shares the operators that are established in C. There are a number of different categories of operators available in Java, there are operators you use to compare values to each other, known as equality operators. The assignment operators that both assign values and can modify them. Mathematical operators for various math operations. Logical operators, and the ternary operator, which is used for shorthand logical operations. The assignment operator is the equals character. This is a simple assignment, where the variable you're assigning to goes on the left side, and the value you're assigning is on the right side of the equal sign. As shown in the first example, in Java, you can declare a value without immediately assigning it. For primitive numeric types, this would result in an initial value of zero. The other primitive types have their own default values. The simple math…

Contents