Learning java Article 4: Operators

Source: Internet
Author: User

Arithmetic Operators

"+": Addition operator. It can also be used for character join.

"-": Subtraction Operator

"*": Multiplication Operator

"/": Division Operator

"%": Returns the remainder operator.

Relational operators

"=": Equal

"! = ": Not equal

"> =": Equal to or greater

"<=": Indicates less than or equal

">": Greater

"<": Indicates less

Logical operators

"&": Operator

"|": OR operator

"! ": Non-Operator

Ternary Operators

Expression 1? Expression 2: expression 3

When expression 1 is true, the result is the value of expression 2. Otherwise, the result is the value of expression 3.

Bitwise operators

"&": Bitwise AND operator

"|": Bitwise OR operator

"^": Bitwise XOR operator

Displacement Operator

">>": Shifts the right operator with symbols

"<": Shifts the left operator with symbols.

">>>": Unsigned right shift operator

Value assignment operator

"=": Value assignment

Contact Us

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.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.