Crazy Java Learning notes----------8 diagrams to understand Java

Source: Internet
Author: User

1.string invariance

Here's a picture showing what this code does

12 String s = "abcd";s = s.concat("ef");
2.the difference between the Equals () method, the Hashcode () method

Hashcode is designed to improve performance. The difference between the Equals () method and the Hashcode () method is that:

    1. If two objects are equal (equal), then they must have the same hash value.
    2. If two objects have the same hash value, they may not be equal (equal).

3.Hierarchy of Java exception classes

The red part of the figure is checked for exceptions. They must be caught, or declared in the function to throw the exception.

4.Hierarchy of collection classes

Notice the difference between collections and collection. (collections contains a variety of static polymorphism methods for set operations)

5.Java Synchronization

The Java synchronization mechanism can be illustrated by analogy to buildings.

6.aliases

An alias means that there are multiple variables pointing to the same block of memory that can be updated, respectively, with different object types.

7.Heap and Stack

The plot shows the location of the method and the object in memory at run time.

8.Java Virtual runtime data region

The illustration shows the situation of the data region when the entire virtual runtime is running.

This paper draws on http://www.importnew.com/11725.html

Crazy Java Learning notes----------8 diagrams to understand 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.