From the course: Java 8+ Essential Training: Syntax and Structure
Unlock the full course today
Join today to access over 22,600 courses taught by industry experts or purchase this course individually.
More about Java operators - Java Tutorial
From the course: Java 8+ Essential Training: Syntax and Structure
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…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
-
-
(Locked)
Work with primitive variables6m 35s
-
Declare and modify primitive values4m 48s
-
(Locked)
Store currency values with BigDecimal3m 32s
-
(Locked)
Convert values between numeric types3m 19s
-
(Locked)
Math operators and the Math class3m 11s
-
(Locked)
Work with boolean values2m 51s
-
(Locked)
Work with character values4m 12s
-
(Locked)
More about Java operators4m 48s
-
(Locked)
-
-
-