Collections in Java
Single column collection
ArrayList
Variable array, default capacity 10. Automatically move the following elements after inserting them
Not thread safe
Vector
The main difference from ArrayList is that the thread of Vector is safe, and other usage methods are consistent with ArrayList
LinkedList
The bottom layer is realized by two-way lin ...
Posted by jwilh on Sun, 02 Jan 2022 19:43:36 +0100
JavaSE learning notes (Day8)
Day8
java exception concept
Exception: in the Java language, abnormal conditions during program execution are called "exceptions" Exceptions (all abnormal conditions at runtime) that occur during the execution of Java programs can be divided into There are two types:
Error: serious problems that cannot be solved by the Java vi ...
Posted by daimoore on Sun, 02 Jan 2022 15:42:47 +0100
Create a multi module project for springboot
Use IDEA to create a new project for maven to manage spring boot (because the community version is used, the plug-in of alibaba is downloaded to help create ~)
Pay attention to modifying the packge. If you use the plug-in, the packge under it will not change. It has always been (PIT)
Top level parent project created successfully! The top-le ...
Posted by medusa1414 on Sun, 02 Jan 2022 15:34:05 +0100
I wrote an IDEA open source plug-in, vo2dto one click to generate object transformation
Header explosion, po2vo, vo2do, do2dto, a bunch of object attributes, take them out and stuff them in. If it were not for the layered anti-corrosion under the DDD architecture, I really want to connect it.
That's BeanUtils Copyproperties , in fact, there are not only this method but also 12 similar methods for object conversion, but overa ...
Posted by Vorotaev on Fri, 31 Dec 2021 07:08:01 +0100
Ah Chang teaches you to use common Lombok @ annotations
preface
Old iron / old fellow friends are good!
What ah Chang shared today is the commonly used Lombok annotation, Official address,github address
Who doesn't know this little pepper when doing Java development. Lombok is a tool that can help us simplify and eliminate some necessary but cumbersome Java code through simple annotation, so as ...
Posted by ScottCFR on Thu, 30 Dec 2021 22:30:40 +0100
[Spring Cloud Alibaba] Mybatis Plus persistence layer
[Spring Cloud Alibaba] Mybatis Plus persistence layer
1,Mybatis Plus
Mybatis Plus is a domestic persistence layer framework. It is very simple to use here. It should be in Chinese!
Mybatis Plus official website: https://baomidou.com/ Spring Cloud Alibaba integrates in the same way as Spring Boot
No invasion: it is only enhanced wit ...
Posted by sportryd on Thu, 30 Dec 2021 17:31:11 +0100
JVM class loading mechanism
From the overall logic of the JVM in the previous article, this article will talk about the class loading mechanism
Review some working models: one we wrote ourselves java file, compiled and generated Class file, will The class file is loaded into the JVM according to The different data information of the class binary file is allocated to ...
Posted by Xadian on Tue, 28 Dec 2021 06:20:00 +0100
Notes on Java threads -- Zhang Hongbo's zero foundation easy learning java
catalogue
1.3 thread status
background
1. Creation status
2. Operable state
3. Inoperable state
4. State of death
1.4 thread scheduling
1.5 thread priority
1.6 daemon thread
1.3 thread status
background
Threads have four states: creation state, runnable state, non runnable state and death state.
1. Creation status
Af ...
Posted by dmb on Mon, 27 Dec 2021 15:00:33 +0100
Java random Prim algorithm and A * algorithm produce random mazes
Procedure requirements:
1. Randomly generate maze map
The maze map needs to be randomly generated in the game and Java util. Random class uses the random number generation method provided by random class to randomly generate obstacles, paths or rewards. Maze map is represented and stored by two-dimensional array.
2. Judge whether the player ...
Posted by bhawap on Mon, 27 Dec 2021 14:04:11 +0100
Mybatis multi table query
1 one to one query (many to one)
Use the simplest User and Account model to analyze the multi table relationship of Mybatis. The User is the User table and the Account is the Account table. A User can have multiple accounts (Account), requirement: query all Account information and associate query order User information. Note: because an Accoun ...
Posted by netpumber on Mon, 27 Dec 2021 00:46:25 +0100