Java Learning 02 (first time)

Source: Internet
Author: User

Consolidating the foundation:

Byte 1 bytes-128 to 127 = 2^ (bytes *8-1), Transition 2 decimal, 01111111 (negative 127) to 11111111 (positive 127), presence plus or minus 0 (00000000), positive zero reserved, negative zero complement, definition 10000000 to 128

Char can automatically be converted to an integer corresponding to the ASCII code, if it is a Chinese character, automatically by Unicode, for example ' A ' = 65, ' Medium ' =20013

int a=56;
int b=a++;
System.out.println (a);
System.out.println (b);

That's right:

57

56

Compilation is the overall compilation, no specified order, then by the submission process, b=a++, belongs to the Post + +, equals {b=a,a=a+1}-first assignment, and then self-increment

So if the output order is changed, the final result is not affected

int a=56;
int b=a++;
System.out.println (b);
System.out.println (a);

That's right:

56

57

Include Order:

int a=56;

System.out.println (a);

int b=a++;
System.out.println (b);

That's right:

56

56

Java Learning 02 (first time)

Related Article

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.