Operators

Arithmetic, relational, logical, bitwise, assignment and ternary operators.


Operators: arithmetic (+,-,*,/,%), relational (==,!=,<,>), logical (&&,||,!), bitwise (&,|,^,~,<<,>>), assignment (=,+=,...), ternary (? :).

Example
int sum = 10 + 5;
boolean ok =(sum > 10)&&(sum < 20);
int max =(a > b) ? a : b;
Video Lesson Open in new tab
Quiz
1. What is the result of 10 % 3 ?
Discussion

Login to join the discussion.


No comments yet.