Java data type + operator + control flow

Source: Internet
Author: User

1: Decimal, octal (starting with 0, except 0), Hex (starting with 0x or 0X) 2:
Data type Memory space (8 bits 1 bytes) Range of values
Byte 8 Guests -128~127
Short 16 Guests -32768~32767
Int 32 Guests -2^31~2^31-1
Long 64 guests -2^63~2^63-1, suffix +l/l
Float 32 Guests With a decimal part, suffix +f/f
Double 64 guests With a small number of parts, can be +d/d
Char 16 Guests ' Single quote '--unicode table code: One by one corresponds to |0X0000~0XFFFF value
3: ' Escape character \+ ... '--single quote--can represent characters or other watchmaking meanings 4:boolean:true/ False-----------------------------------implicit conversion int-long-float-double display conversion (type) _____________________________________ _5: operator
Operator Binding nature
[ ] . () (Method call) From left to right
! ~ + +--+ (unary operation)-(unary operation) From right to left
* / % From left to right
+ - From left to right
<< >> >>> (unsigned Right shift) From left to right
< <= > >= instanceof Comparison From left to right
==           != From left to right
& From left to right
^ From left to right
| From left to right
&& From left to right
|| From left to right
? True:false From right to left
= + = = *=/=%= &= |= ^= <<= >>= >>= From right to left
6: Control Flow if () {--------}else if () {-------}else{--------}switch () {case A:-----; Break;default:--------;} while () {-----};d o{----}while (), for (a;b;c) {---------}

Java data type + operator + control flow

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.