Java Basics Miscellaneous (4)

1. Common hash conflict resolution methods:
A. Open address method
B. Chain address method (HashMap used this method before java8, and HashMap introduced balanced tree method in java8)
C. Re-hash (secondary hash)
D. Create a public overflow area

2. The equals method in Integer

public boolean equals(Object obj) {
        if (obj instanceof Integer) {
            return value == ((Integer)obj).intValue();
        }
        return false ;
}

So new Integer(1).equals(new Integer(1)) is true

3. The method
run() method in Thread is used to execute the specific content in the thread body
start() method is used to start the thread object and make it ready The state
sleep() method is used to put the thread into sleep state
The suspend() method is used to suspend the thread and restart it through the resume() method

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=326990842&siteId=291194637