Relive thinking in Java

Source: Internet
Author: User

1. High precision

BigInteger, BigDecimal support for arbitrary-sized numbers can not be used operator operation speed relative to int, float slightly slower

2. Object Scope

{    new String ("AAA");}

Outside of this stack, the reference S has gone beyond its scope to exist, but the new String ("AAA") objects in this heap still exist in memory

At this point, Java garbage collection detects those unreferenced objects and then automatically frees the unused memory

3. Shift Operators

<< shift left Low 0

>> Right Move value is positive high 0 if negative high plug 1

>>> move right either positive or negative high plug 0

Note that negative numbers are complementary, for example 22:0001 0110

-22: First absolute value 0001 0110 anti-code 1110 1001 complement = anti-code +1 1110 1010

4.

Relive thinking in Java

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.