From the course: Oracle Java Certification: 2. Operators and Decision Statements
Unlock the full course today
Join today to access over 22,600 courses taught by industry experts or purchase this course individually.
Unary operators - Java Tutorial
From the course: Oracle Java Certification: 2. Operators and Decision Statements
Unary operators
- [Instructor] Computing is about information processes. Once the information is represented as data we can operate on them. Java has many built-in functions for such operations we called them operators. We need to know the functions they perform and understand how they behave, especially in the presence of other operators. Operators in Java can be categorized in many different ways. This table divides all Java operators into 10 categories. One we took class operators is by the number of operands they can take, their unary, binary and ternary operators. Each operator and its operands form an expression and each operand can be a sub-expression consisting of other operators with their operands. Therefore, an expression can always be evaluated into a single value by recursively evaluating all its sub-expressions. Let's look at an example. Here, we defined a variable "a" and apply the unary plus and minus operators three…
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.