Precedence of operators in JavaThe so-called priority is the order of operations in an expression. The precedence of operators commonly used in Java is shown in the following table:650) this.width=650; "src=" http://img.mukewang.com/5360ffb90001b4f00
Precedence
Operator
Description
Example
associativity
1
()[]-.::++--
Grouping operatorArray AccessMember access from a pointerMember access from a objectScoping operatorPost-incrementPost-decrement
(A
In the logical operator of PHP, XOR represents a logical XOR or
$a XOR $b
Results
Returns true if the $a and $b have and only one is true, or False if all are true or false.
However, when testing the XOR operator, a little problem was founderror
One, bitwise operatorsIn general applications, we basically use an operator that is not in place. Although, it is based on the underlying, performance and speed will be very good, and that is because the lower level, the use of the difficulty is
Java operator PrecedenceReprinted from: http://www.cnblogs.com/gw811/archive/2012/10/13/2722752.html
Serial number
Symbol
Name
Adhesion (with operands)
Mesh number
Description
1
.
Point
Note: The label 1-15 priority is from high to low.
Priority level
Operator
Meaning
Number of operations
Combination direction
1
() [].
Parentheses subscript operator Pointer to struct member
Priority Level
operator
Description
Example
Binding Nature
1
()[]-.::++--
The parentheses operator that adjusts the precedenceArray Subscript access operatorTo access a member's operator by pointing to the
JS Operator PrecedenceBlog Category:
Web Front end-js language core
JavascriptZccstThe JS operator priority is also a huge pit. Sometimes you get around, for example:var TPL = len > Max && exceedtpl | | DEFAULTTPL;As I understand it,
Priority level1,[], (),.,--from left to right2,-,~,++,--,*,&,! , (type), sizeof () from right to left. The monocular operator.3,/, *,% binocular operator4, +,-5, > shift6, 7, = =,! =8-12, &,^, |, &&, | | logical operators13,?: Right to Left14,=, *=,%
The following table lists the JavaScript operators, sorted from highest to lowest in order of precedence. operators that have the same precedence are evaluated in order from left to right.
Operator
Description
. [ ]
Remember when you were a child of the beast Chess, mice can eat elephants, haha. --like lion Tiger Leopard, dog Wolf Cat Mouse.We divide the C language operator level 15 priority into 8 groups, each of which takes a representation. As follows:Why do
Idle to write code in a boring mess. The discovery of basic things sometimes is also very abstract. Don't believe me? Let's take a look at the following statement:int 5 ; int Ten = i =-i++;If the above code is VC + + code, then the output is:i=-4 j=
Java operator Precedencetransferred from:http://www.cnblogs.com/gw811/archive/2012/10/13/2722752.html
Serial number
Symbol
Name
Adhesion (with operands)
Mesh number
Description
1
.
Point
1 short circuit with &&, when the left is false, do not execute to the right;Short Circuit or | |, when its left is true, does not execute to the right.2 int a=1;if (a++==2) {A = 7;}System.out.println (a);The output is 2, because when + + is on the
Today in a video learning C language operators, the video mentions assignment operations, relational operations, logical operations, trinocular operations, and the priority relationship between them. In order to satisfy my thirst for knowledge, I
Priority level
Operator
Describe
Example
Binding nature
1
() [] -> . :: + + --
Array subscript access operator operator that accesses a member through a pointer to an object operator that accesses
The following table lists all the operators from highest to lowest priority:
operator
Description
**
Index (highest priority)
~ + -
Bitwise flip, unary Plus and minus (the last two methods
This article mainly introduces the introduction of access control and operator precedence in PHP, need friends can refer to the following
copy code code as follows:
class Foo
{
private $name = ' hdj ';
Public Function GetName () {
return
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.