Deep understanding of JDK8 HashMap

The author wrote in the last article, " Deep understanding of JDK7 HashMap HashMap's implementation principle in JDK7 is explained in detail, mainly around its put, get, resize, transfer methods. This paper will continue to analyze the specific implementation of HashMap in JDK8. Starting with put, ...

Posted on Mon, 17 Feb 2020 16:32:48 -0800 by rrhody

The creation of mybatis - mapper.java

1, Mapper.java creation process When registering the bean, the beanClass is replaced with MapperFactoryBean. When creating an instance, the getObject() method of MapperFactoryBean will be called to get the instance @Override public T getObject() throws Exception { return getSqlSession().getMapper(this.mapperInterface); } public Sq ...

Posted on Thu, 13 Feb 2020 12:37:48 -0800 by smclay

Notes on design mode 01: simple and efficient single example mode

Design patterns are essential skills for good programmers, and they are often mentioned in interviews. Preface IT industry is the industry with high job hopping rate, which is not frequent to interview. As an interviewer, if the candidate's other knowledge is OK, I will finally mention the content related to * * design pattern. If the answ ...

Posted on Wed, 12 Feb 2020 20:21:37 -0800 by auddog

Java entry note 07 enumeration class

Introduction: in some cases, the objects of a class are limited and fixed, such as the season class. There are only four objects: spring, summer, autumn and winter. This kind of class with limited and fixed instances is called enumeration class. In JDK 5.0 and later, enum keyword can be used to define enumeration class, and it is inherited from ...

Posted on Tue, 11 Feb 2020 03:18:19 -0800 by FireDrake

Teach you an easy way to speed up your Eclipse startup by 1.5 seconds!

Have you ever thought about the Eclipse you use every day What kind of garbage collector does it use? How many GC S have been executed at startup? Can you tune its startup speed? In this article, I will introduce how I can tune Eclipse to make its startup speed increase by 1.5 seconds. You may say that it's only 1.5 seconds. It needs to be s ...

Posted on Thu, 06 Feb 2020 22:12:29 -0800 by svanderclock

#IT star is not a dream. Agent mode is so simple

If you don't understand dynamic agents, you can't understand the principles of many of the most popular frameworks, such as spring. If you don't understand the offer of dynamic agent, you are likely to get involved. To understand dynamic agent, we must first understand agent pattern What is agent mode? There is a printer class public class Pri ...

Posted on Wed, 05 Feb 2020 03:31:05 -0800 by tjhilder

Use of Stream streams in Jdk8 to get you out of the for loop

Learning requirements: A little knowledge of functional interfaces and Lambda expressions is helpful for better learning. 1. Experience the benefits of Stream first Requirements: Give you an ArrayList to save your students'results and let you print out results greater than 60. public static void main(String[] args) { ArrayList<Integ ...

Posted on Tue, 04 Feb 2020 11:50:02 -0800 by allanric

[Java foundation] 11 "single column set and generics

Collection collection Collection overview In the previous basic class, we have learned and used ArrayList, so what is a collection? Collection: collection is a container provided in java, which can be used to store multiple data. Since sets and arrays are containers, what's the difference between ...

Posted on Tue, 04 Feb 2020 02:58:39 -0800 by MrNonchalant

Design Mode - Agent Mode

In some cases, a client cannot or does not want to access another object directly, and then an intermediary is needed to help complete a task, which is a proxy object.For example, buying a train ticket does not necessarily mean going to a train station. It can be bought through the 12306 website or a ...

Posted on Mon, 03 Feb 2020 18:27:58 -0800 by Daijoubu

[Netty] startup of NioEventLoop: processSelectedKeys execution logic

review If you forget how to enter the method, please go back newChild chapter io.netty.channel.nio.NioEventLoop#run ... // Check I/O Events select(wakenUp.getAndSet(false)); ... // Handle the I/O events found by select above processSelectedKeys(); ... // Run the event set processed above runAllTasks( ...

Posted on Fri, 31 Jan 2020 13:08:43 -0800 by SuprSpy79