Java View all facts Glossary Help |
syntactic unit > symbol > operator |
operator comparison table |
Subject | have syntax | have | cause | is a synonym of | is a kind of | is a subtopic of | have example | is an instance of | have purpose | shorten | has definition | use | return | see also | |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
. | precedence | dot operator | Operators | operator | to perform a simple function of 1 to 3 arguments | to access an instance variable of an object in Java, for example: b.variableName | a value called its result | ||||||||
?: | expression ? op1 : op2 | right to left associativity | conditional operator | Operators | tertiary operator | to evaluate the expression on the left and return one value if the expression is true and a different value if the expression if false | code but can also make code harder to understand | the value of the selected expression | |||||||
arithmetic operator | precedence | operator | Operators | to perform basic arithmetic operations | a value called its result | ||||||||||
assignment operator | precedence | operator | Operators | to perform a simple function of 1 to 3 arguments | An operator that performs assignment to the variable on the left and returns the value of the expression on the right | a value called its result | |||||||||
binary operator | precedence | operator | Operators | to perform a simple function of 1 to 3 arguments | An operator that has 2 arguments | an infix notation | a value called its result | ||||||||
bitwise operator | precedence | operator | Operators | to perform a simple function of 1 to 3 arguments | An operator that performs a boolean operation bit by bit on two integral types of the same length | a value called its result | |||||||||
cast operator | (type) expression | precedence | Objects | operator | to convert an expression of one type into another type | a value called its result | |||||||||
identity comparison operator | precedence | operator | Operators | to perform a simple function of 1 to 3 arguments | a value called its result | ||||||||||
logical operator | precedence | conditional operator | operator | Operators | to perform operations on boolean operand(s) | a boolean | |||||||||
new operator | precedence |
| creation operator | Operators | Rectangle rect = new Rectangle(); | operator | to create a new object | An operator that creates a new object (allocates space for it). | a value called its result | new | |||||
postfix operator | precedence | operator | Operators | to evaluate the value of the operand and then to perform the operation | a value called its result | ||||||||||
prefix operator | precedence | operator | Operators | to perform the operation and then to evaluate the value of the operand | a value called its result | ||||||||||
relational operator | precedence | operator | Operators | to perform a simple function of 1 to 3 arguments | a value called its result | ||||||||||
short circuit operator | precedence | operator | Operators | to perform a simple function of 1 to 3 arguments | a value called its result | ||||||||||
tertiary operator | precedence | operator | Operators | to perform a simple function of 1 to 3 arguments | An operator that has 3 arguments | a value called its result | |||||||||
unary operator |
| precedence | operator | Operators | to perform a simple function of 1 to 3 arguments | An operator that has 1 argument | a value called its result |