Java Daily Tour 3

Source: Internet
Author: User

1. About byte

Byte is a byte in memory, and the range is -128-127,128 to convert to byte to-128, because 128 of the binary means: 1000 0000, the highest bit is the sign bit.

2. About Hibernate (note first, not yet learned)

Use Many-to-one as much as possible and avoid using single one-to-many.
Flexible use of unidirectional one-to-many.
Instead of one-to-many, use a multi-pair alternative.
Configure the object cache without using the collection cache.
Use set for one-to-many use of the bag.
Inheritance uses the display polymorphic Hql:from object polymorphism= "Exlicit" to avoid investigating all objects.
Eliminate large tables, using level two caching.

3. Also talked about wait ()

Wait () must be an exception catch; calling the Wait () or notify () method must be called with the current lock, that is, the object in synchronized must be used.

4. Also mentions the JVM

Runtime data area includes: Virtual machine stack, heap area, method area, local method stack, program counter

Virtual Machine Stack area : That is, we often say that the stack area, thread-private, storage base type, object reference and ReturnAddress, during compilation to complete the allocation.

Heap Area , Java heap, also known as GC heap, all threads shared, storage instances and arrays of objects, Java heap is the main area of garbage collector management.

method Area : All threads are shared, storing data such as class information, constants, static variables, and instant compiler compiled code that have been loaded by the virtual machine. The target of memory reclamation in this area is mainly the collection of objects for the constant pool and the unloading of the types.

program counter : Thread private, each thread has its own independent program counter, used to indicate the address of the next instruction.

Learning needs constant Repetition!

Java Daily Tour 3

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.