Make clear the relationship among Minor GC, Major GC and Full GC
Preface
This article requires the reader to be familiar with the general garbage collection principles built into the JVM. Heap memory is divided into Eden, Survivor and Tenured/Old spaces. Generation assumption and other different GC algorithms are beyond the scope of this paper.
Minor GC
Reclaiming memory from younger generation spaces, i ...
Posted by abx_2112 on Tue, 15 Oct 2019 06:18:33 -0700
Java daemon threads from a JVM Perspective
Java Multithreading Series 7.
Let's talk about another feature of threads: daemon threads or user threads?
Let's first look at the annotations for the Thread.setDaemon() method, as shown below.
Marks this thread as either a daemon thread or a user thread.
The Java Virtual Machine exits when the only threads running are all daemon threads.
Thi ...
Posted by SpinCode on Mon, 14 Oct 2019 18:13:31 -0700
jprofile remote monitoring JVM (spring boot project)
jprofile installation
Linux Server InstallationOfficial website address Choose:
After downloading, upload to the server under test under / opt, decompress, renamed: jprofiler11
Local Installation Clientmac Cracked Edition Download Address
Download and install according to the tutorial on the web p ...
Posted by arhunter on Sun, 13 Oct 2019 11:19:51 -0700
Thread Foundation
Thread Foundation
1. Understanding threads in java
1) Programs in java are inherently multithreaded
public static void main(String[] args) {
ThreadMXBean threadMXBean = ManagementFactory.getThreadMXBean();
ThreadInfo[] threadInfos = threadMXBean.dumpAllThreads(false, false);
for (ThreadInfo threadInfo : threadInfos) {
System ...
Posted by dave_c00 on Sun, 13 Oct 2019 01:41:50 -0700
Deep and Shallow Copies (Objects)
Cloneable:CloneableSupportedException
clone() provided by the Object class can only be used if the subclass implements the Cloneable interface, otherwise the above exception will be thrown.
protected native Object clone() throws CloneNotSupportedException;
To make an object copy, we must implemen ...
Posted by gplaurin on Sat, 12 Oct 2019 10:03:38 -0700
Java in-depth learning: locks
Re-lockable:
Simply put, repetitive locking is supported and reusable
Features: Locks can be passed, methods can be passed recursively
Objective: To avoid deadlock phenomenon.
Code:
public class Test implements Runnable {
@Override
public void run() {
method1();
}
public synchronized void method1() {
...
Posted by sentient0169 on Sat, 12 Oct 2019 02:54:36 -0700
java Foundation (21): Exceptions
1. exceptions
What is an exception? The problem with Java code at runtime is exceptions.
In Java, exception information is encapsulated into a class. When problems arise, exception class objects are created and exception-related information (such as the location, cause, etc.) is thrown.
1.1 Abnormal Inheritance System
Exception cla ...
Posted by sup on Fri, 11 Oct 2019 01:43:58 -0700
How much do you know about the latest features of Java 13?
JDK 13 was officially released on September 17, 2019.
The new version contains five main features
JEP 350: Dynamic CDS Archives
JEP 351: ZGC: Uncommit Unused Memory
JEP 353: Reimplement the Legacy Socket API
JEP 354: Switch Expressions (Preview)
JEP 355: Text Blocks (Preview)
Dynamic CDS Archives
First, we introduce CDS, which is called Class ...
Posted by Brown on Fri, 11 Oct 2019 01:05:18 -0700
Tamping Java Foundation Series 13: Deep Understanding of Generics in Java
This series of articles will be sorted out into my Java Interview Guide warehouse on GitHub. For more interesting information, please visit my warehouse.
https://github.com/h2pl/Java-Tutorial
If you like, please trouble Star, Fork, Watch three Lian ha, thank you for your support.
The article was first published on my personal blog:
www.how2play ...
Posted by bennyboywonder on Thu, 10 Oct 2019 04:08:41 -0700
Java Enumeration Class Use
Articles Catalogue
I. Examples of Several Enumeration Classes
1. Simplest Enumeration
2. General Enumeration Class Usage
3. Use enumeration in switch
Enumeration Class Method
I. Examples of Several Enumeration Classes
1. Simplest Enumeration
enum Nuber {
One, Two
}// enum's grammatica ...
Posted by dujed on Thu, 10 Oct 2019 01:15:30 -0700