Analysis of the underlying mechanism and source code of HashMap
Analysis of the underlying mechanism and source code of HashMap
1. Schematic diagram:
1. < K, V > is to use HashMap$Node to realize map Entry<K,V>. 2. The bottom layer of HashMap is JDK7 0 is implemented in [array + list]. jdk8. After 0, it will be realized by [array + list + red black tree]. When the list reaches a certain leng ...
Added by naitsir on Fri, 11 Feb 2022 14:24:31 +0200
[Java basic dry goods] analysis of ArrayList source code
All the code in this article comes from jdk1 eight
Introduction to ArrayList
public class ArrayList<E> extends AbstractList<E>
implements List<E>, RandomAccess, Cloneable, java.io.Serializable
ArrayList inherits AbstractList and implements list, randomaccess, Cloneable, Java io. Serializable interface
java.lang.Ob ...
Added by stickman373 on Fri, 11 Feb 2022 13:48:22 +0200
Simple discussion on decoration mode
Simple discussion on decoration mode
1. Brief description of decoration mode
Decoration pattern is a design pattern used to replace inheritance. It dynamically adds responsibilities to objects without defining subclasses, and uses the association relationship between objects to replace the inheritance relationship between classes. It reduc ...
Added by seanpaulcail on Fri, 11 Feb 2022 13:32:53 +0200
Chapter 4 of SpringBoot: Handling global exceptions
We talked about handling global exceptions in spring MVC. Of course, spring boot also has global exception handling.
I Custom processing common 404 and 505 pages.
For example, if we enter a path that does not exist in the program, we will jump to the interface that cannot be found in 404.
Input: http://localhost:8080/j/show1
In fact, s ...
Added by Loki_d20 on Fri, 11 Feb 2022 12:58:23 +0200
Servlet learning diary 5 -- servlet core interfaces and classes
catalogue
1, Servlet core interfaces and classes
1.1 Servlet interface
1.2 GenericServlet abstract class
1.3. HttpServlet class (recommended)
1.4 notes
2, Two configurations of servlet s
2.1 configuring web XML (used before servlet 2.5)
2.2 # using annotations (supported after servlet 3.0, recommended)
1, Servlet core interfaces and c ...
Added by genericnumber1 on Fri, 11 Feb 2022 12:32:16 +0200
What advanced developers can learn from beginners
In the past few years, I have the luxury of working and mentoring with a considerable number of beginners. Although I have clearly witnessed a considerable part of my programming failure, things are not as black and white as they seem. Among beginners, I always see some patterns and behaviors. While some of these behaviors are misleading and ha ...
Added by LTJason on Fri, 11 Feb 2022 12:04:46 +0200
netty series: true equality – Rendezvous in UDT
brief introductionIn all the knowledge of netty we mentioned before, netty seems to be divided into client-side and server-side. The server listens to the connection and processes the messages in the connection. The client establishes a request connection to the server, so that it can send messages.However, all this should be terminated in UDT ...
Added by notsleepy on Fri, 11 Feb 2022 11:43:09 +0200
In depth details ThreadLocalMap
Previous article Analysis of ThreadLocal , let's have a general understanding of its internal operation mode. Students who are not familiar with ThreadLocal are advised to read it before instructing the following articles, which is more or less helpful.In this article, I focus on understanding ThreadLocalMap. Look at the internal implementation ...
Added by HFD on Fri, 11 Feb 2022 08:22:39 +0200
Collection ~ how does Dropbox solve the memory leak problem of Android App?
A memory leak occurs when an application allocates memory for an object and the object is not released when it is no longer used. Over time, the leaked memory will accumulate, resulting in poor application performance or even crash. Leaks can occur on any program and platform, but due to the complexity of the activity life cycle, this situation ...
Added by Aeolus on Fri, 11 Feb 2022 08:12:00 +0200
SSM framework integration ideas (personal view)
SSM framework integration ideas (personal view)
The ssm framework is frequently used in projects. In order to focus on the business code in the project, I sorted out the steps to be used by the ssm framework. The following figure is the result of the sorting. (the green box in the figure is the key point of the process, and the changes in each ...
Added by froggie81 on Fri, 11 Feb 2022 07:57:10 +0200