Interpretation of the core source code of ArrayList
Interpretation of the core source code of ArrayList
Feel easy to use little partner, please give me a praise Oh, thank you very much!!! Most of the content comes from the Internet, and individuals have added additional content to facilitate understanding and memory
1. Basic information of ArrayList
The underlying array of ArrayList ...
Added by RandomZero on Sat, 19 Feb 2022 16:36:49 +0200
ControllerAdvice analysis description
ControllerAdvice analysis description
@What controller advice sees most is the same as exception handling. Like this one below
@ControllerAdvice
public class TestControllerAdvised {
@ExceptionHandler(value = Exception.class)
public String modelAndViewException(){
// Do some exception handling logic
}
}
When reading the source code of s ...
Added by robocop on Sat, 19 Feb 2022 16:32:20 +0200
Introduction to three Java process structures
Sequential structure
The basic structure of Java is sequential structure. Unless otherwise specified, it will be executed sentence by sentence in order Sequential structure is the simplest algorithm structure Between statements and between boxes, it is carried out from top to bottom. It is executed by several in turn
Select stru ...
Added by londonjustin on Sat, 19 Feb 2022 14:45:13 +0200
Android Studio calls Gaode map api
preface:
In the process of successfully calling Gaode map api, I really encountered many problems. I feel that I have encountered all kinds of problems, such as importing jar package and For example, I found many conflicts between the two versions of grad.sok, but I did not try to resolve the conflicts between the two versions of grad.sok when ...
Added by Kelset on Sat, 19 Feb 2022 14:44:12 +0200
java serialization, read this article is enough
java serialization, read this article is enough
1, Meaning, meaning and usage scenario of serialization2, Serialization implementation1,Serializable1.1 ordinary serialization1.2 members are serialization of references1.3 mechanism of serializing the same object multiple times1.4 potential problems of Java serialization algorithm1.5 optional cu ...
Added by zaiber on Sat, 19 Feb 2022 14:32:26 +0200
[mybatis] a direct conclusion
Mybatis
brief introduction
MyBatis is an excellent persistence layer framework, which supports custom SQL, stored procedures and advanced mapping. MyBatis eliminates almost all JDBC code and the work of setting parameters and obtaining result sets. MyBatis can configure and map primitive types, interfaces and Java POJO s (Plain Old Java Objec ...
Added by Griff1324 on Sat, 19 Feb 2022 13:48:02 +0200
The growth path of Architects - Design Patterns - 07 Prototype mode, clone mode, java attribute replication
Prototype mode
Prototype pattern solves the problem of copying a large number of attributes. This paper will introduce several depth attribute replication methods and several shallow attribute replication methods. The source code address of this paper will be given at the end of the text.
Code before prototype pattern is not used
public stat ...
Added by dragin33 on Sat, 19 Feb 2022 13:15:26 +0200
Java basic programming job 2
1 - simple encryption system based on ASCII code
[problem description] implement a simple encryption system based on ASCII code.
The encryption rules are as follows:
if (OriginalChar + Key > 126) then
EncryptedChar = ((OriginalChar + Key)-127) + 32
else
EncryptedChar = (OriginalChar + Key)
The qualified key is a number ...
Added by The Wise One on Sat, 19 Feb 2022 13:05:32 +0200
Simple interface implementation
Simple interface implementation
Basic knowledge understanding
package In the previous study, we simply mastered the function relationship between classes and objects, and between classes. For the sorting of different code files, we put forward the concept of package, which can be understood as a folder to classify code files and facilitate fu ...
Added by landavia on Sat, 19 Feb 2022 12:57:26 +0200
The art of java Concurrent Programming -- Analysis of ReentrantLock's fair lock principle
lock method analysis
final void lock() {
acquire(1);
}
The lock method calls the acquire method of AbstractQueuedSynchronizer
/**
* Acquires in exclusive mode, ignoring interrupts. Implemented
* by invoking at least once {@link #tryAcquire},
* returning on success. Otherwise the thread is queued, possibly
...
Added by nelsok on Sat, 19 Feb 2022 12:47:28 +0200