Java Basic Finishing Summary (1)

Source: Internet
Author: User

》》Java data region, roughly the following types ofRegister:Within the CPU, the number of registers is limited, so the registers are allocated according to demand. It cannot be controlled directly.Stack:In Universal RAM (random access memory), direct support can be obtained from the processor through a stack pointer. If the stack pointer moves down, the new memory is allocated, and if you move up, the memory is freed. This is a fast and efficient method of allocating storage, second only to registers. When you create a program, the Java system must know the exact life cycle of all items stored in the stack to move the stack pointer up or down. This constraint limits the flexibility of the program, so while some Java data is stored on the stack-especially object references-Java objects are not stored here.Heap:A common memory pool (located in RAM) for storing all Java objects. The benefit of a heap that differs from the stack is that the compiler does not need to know how long the stored data will survive in the heap. Storage allocation and cleanup with heaps can take more time than storage allocation with stacks.constant Storage:Constant values are usually stored directly inside the program code, and it is safe to do so because they are never changed and are usually placed in ROMnon-RAM storage:If the data is completely outside of the program, it can be free from any control of the program and can exist when the program is not running. Two of the basic examples are stream objects and persisted objects. 》》Java Basic type occupies space sizefor high-precision operations, you can replace common wrapper types with BigInteger and BigDecimal》》member Basic variable default value》》++i and i++ differences++i: First self-increment, then generate the value; i++: The value of Sir, and then self-increment. 》》logical and bitwise operators and displacement Operatorslogical operators (&& and/| | OR/! Non) Boolean operation generates a Boolean bitwise operator (& with/| or/~ non-/^ xor) displacement operation to generate an integer shift operator (<< left shift operator, right fill 0/>> signed right shift operator, positive left complement 0, negative left complement 1/>>> Unsigned operator, left 0)

Java Basic Finishing Summary (1)

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.