java Foundation (32): Class Loading, Reflection

1. Class loader 1.1 Class loading When a program wants to use a class, if the class has not been loaded into memory, the system will initialize the class by loading, connecting and initializing three steps. Load It means to read the class file into memory and create a Class object for it. The system creates a Class object when any class ...

Posted on Mon, 14 Oct 2019 04:41:14 -0700 by aurigus

Principle of remove overloaded method invocation for List interface of JAVA

Preface To be honest, I usually read the source code by myself, and I rarely have the impulse to write it. But when we write algorithms, we often use various sets in java, among which remove method is more commonly used. remove has overloaded functions, and the parameters passed in are index or data object (automatic conversion after specifying ...

Posted on Wed, 09 Oct 2019 09:14:45 -0700 by CONTEMAN

With Completable Future, asynchronous programming is less difficult!

Introduction to this article: Introduction to Business Requirements Scenarios Thoughts on Technical Design Scheme Future Design Model Completable Future Mode Actual Combat Suggestions for Completable Future Production Completable Future Performance Test Completable Future uses extensions 1. Introduction to Business Requirements Scenarios Th ...

Posted on Tue, 08 Oct 2019 07:48:43 -0700 by strangebeer

4 Object Memory Diagram

Create an object Through drawing, we can see how objects are allocated in memory, which is more helpful for beginners to understand objects. Student class class Student{ //Student ID int id; //Full name String name; //Gender boolean sex; //Age int age; public vo ...

Posted on Sun, 06 Oct 2019 17:24:38 -0700 by cocpg

druid database connection pool password encryption processing (official network)

Use ConfigFilter The functions of ConfigFilter include: Read the configuration from the configuration file Read configuration from remote http file Encryption for database passwords 1 ConfigFilter Configuration 1.1 Configuration file read from local file system <bean id="dataSource" class ...

Posted on Sun, 06 Oct 2019 15:21:14 -0700 by dtyson2000

Generics of Java Foundation

background Before generics are available, once an object is dropped into a collection, the collection will forget the type of the object and treat all objects as Object types. When a program removes objects from a collection, a forced type conversion is required, which can easily cause ClassCastException exceptions. Definition The program speci ...

Posted on Thu, 03 Oct 2019 22:58:24 -0700 by estero2002

Chapter 5 Lifecycle Processor (Life Cycle)

Preface Lifecycle Processor is responsible for managing the Application Context life cycle. It's a very important part of Application Context, and there are very few places that need it. Lifecycle Lifecycle interface, no obvious call. So Lifecycle is basically useless. public interface Lifecycle { void start(); void stop(); boolean i ...

Posted on Thu, 03 Oct 2019 15:14:47 -0700 by gdhanasekar

Deep into jvm kernel-principle, diagnosis and optimization-2.jvm operating mechanism

I. jvm Operating Mechanism Write a program to let the program run and eventually throw out the OOM caused by Perm overflow. Give the jdk version of the program, the source code of the program, the running parameters, the screenshot of the system after overflow, the description of the jar package that the program relies on, and explain your ba ...

Posted on Tue, 01 Oct 2019 19:50:23 -0700 by mrhappiness

Java Agent-based Full Link Monitoring IV "JVM Memory and GC Information"

Chapter list: pay attention to the public address, bugstack wormhole stack, reply to < JavaAgent based full link monitoring > get source code. Java Agent-based full-link monitoring JavaAgent " Java Agent-based Full Link Monitoring II "Increasing Monitoring Execution Time by Bytecode&quo ...

Posted on Tue, 01 Oct 2019 17:07:24 -0700 by gabriel kent

Principle and application of concurrent synchronized java

In the field of concurrent programming in java, the synchronized keyword has always been the elder role. In the early version of java, synchronized is a heavy lock, which is inefficient, because monitor is implemented by Matrix Lock of the underlying operating system, and the thread of Java is mapped to the original line of the operating system ...

Posted on Sun, 29 Sep 2019 03:13:20 -0700 by keziah