Initialization process of java object (static member, static code block, common code block, construction method)

I. Initialization of java objects The first step is to load the class. A java object loads the class before initialization and generates the class object in the JVM. Loading a class does the following, which is described recursively below. (See Reflection for more details on Class objects Click here) If the class has a parent, the parent class ...

Posted by djopie on Wed, 15 May 2019 04:50:03 -0700

AQS Synchronization Component--ReentrantLock and Lock

ReentrantLock and Lock Synchronized and ReentrantLock are different Reentrant: Both are reentrant Lock implementation: Synchronized is implemented by jvm, and ReentrantLock is implemented by jdk.(We can understand that one implementation is at the operating system level and the other is at the user's own level.) The implementation of Synchroni ...

Posted by The Bat on Wed, 15 May 2019 01:36:09 -0700

JNI and NDK Programming Knowledge Points

Summarize the knowledge points related to JNI and NDK. Reprinted please indicate: http://blog.csdn.net/feather_wch/article/details/79599270 JNI and NDK Programming Version: 2018/3/18-1 (11:36) JNI and NDK Programming Brief Introduction to JNI and NDK Reference books Brief Introduction to JNI and NDK ...

Posted by d401tq on Tue, 14 May 2019 15:16:42 -0700

java data structure and algorithm 02 (stack)

What is a Stack? The stack here and the java stack of the jvm are not one thing... As a data structure, I feel that stack is like an interface. There are many ways to realize stack functions, such as using arrays, collections and linked lists. The most important feature of stack is to go first, then go out. You can imagine how to put the box o ...

Posted by anurag2003 on Tue, 14 May 2019 09:41:08 -0700

Java Content Carding (17) API Learning (5) Files

1. The Construction Method of File Class (1) The role of File classes Representing a file or directory with an object of the File class (2)File(String path) Create a File object by specifying the path of a file or directory Path: It can be either a relative path or an absolute path. For example: File noteFile = new Fil ...

Posted by manimoor on Sat, 11 May 2019 05:03:17 -0700

Design Patterns | Single Column Patterns >7 Implementation

Singleton pattern is a common design pattern, and may be the least code in design pattern. But less doesn't mean that it's easy, easy to use, easy to use, and easy to use. Because it involves a lot of Java underlying knowledge such as class loading mechanism, Java memory model, volatile and so on. brief introduction The singleton pattern belong ...

Posted by zzman on Sat, 11 May 2019 00:37:14 -0700

Redisson: Redis Official Wheel for Building Distributed Locks

Integrating Redisson with SpringBoot I. Introducing Dependence <dependency> <groupId>org.redisson</groupId> <artifactId>redisson-spring-boot-starter</artifactId> <version>3.10.6</version> </dependency> 2. Adding configuration ...

Posted by compt on Fri, 10 May 2019 14:51:43 -0700

ELK Log Platform System Installation

ELK Log Platform System Installation 1. Download elk wget https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-5.6.0.tar.gz wget https://artifacts.elastic.co/downloads/logstash/logstash-5.6.0.rpm wget https://artifacts.elastic.co/downloads/kibana/kibana-5.6.0-x86_64.rpm II. jdk Installation [roo ...

Posted by adrian_quah on Fri, 10 May 2019 09:28:28 -0700

Chapter 2 Database Environments

Chapter 2 Database Environments Whether you are using Direct Persistence Layer (DPL) or the underlying API, you must use a database environment. A database environment encapsulates one or more databases. By allowing a single in-memory cache for each database contained in the environment, this encapsulation provides your thread ...

Posted by ndondo on Fri, 10 May 2019 01:34:39 -0700

JAVA Annotations and Reflections

Annotations to JAVA What is annotation? Annotations are still very popular at present, and Sprinng, which we often use, uses annotations. Adding annotations can make the code concise, easy to read and use. First, let's look at our own meta-annotations in java, under the java.lang.annotation package, where @Native@Repeatable ...

Posted by Lyleyboy on Thu, 09 May 2019 22:58:38 -0700