Five years after graduation, with an annual salary of one million, I have mastered the simplest and rudimentary methods of getting started with java
hello everyone! I am an old ape. I love technology. I have been in the Java industry for 7 years and am on the way to learn and share every day!
thread
1. Introduction
As we all know, multithreading brings us better resource utilization and better program response, so I won't elaborate on its introduction. You can search by yourself. I'm ma ...
Posted by livvylove on Thu, 10 Feb 2022 11:27:18 +0100
On OOM problem solving and optimization
OOM memory
OOM: out of memory For the memory related configuration of the JVM, there are corresponding recommendations on many open source JAVA components eg:http://rocketmq.apache.org/docs/system-config/
1. There are not too many JVMs on the memory allocation line
> jvm 70% of heap memory%Total machine memory (empirical value)
> ...
Posted by zang8027 on Thu, 10 Feb 2022 04:02:50 +0100
Deep understanding of Java enumeration mechanism
Before reading this article, you need to understand how to define enumeration and its simple use
enumeration
1, How the JVM handles enumerations
A simple enumeration class public enum Fruit{
APPLE(67),ORANGE(68),BANANA(69);
int code;
Fruit(int code){
this.code=code;
}
}
Decompile fruit. Using the Jad command C ...
Posted by rjs on Thu, 10 Feb 2022 00:41:37 +0100
Java multithreading: take you to know different locks!
I Lock interface
Lock interface is the foundation of everything. Its abstract class is a tool used to control the access of multiple threads to shared resources
The following methods are provided to abstract the whole business:
void lock()void lockInterruptibly() throws InterruptedException: breaks the lockboolean tryLock(): non blockin ...
Posted by PHP'er on Thu, 10 Feb 2022 00:05:11 +0100
The interviewer asked: JVM garbage collector and recycling algorithm, I rely on this to change my life!
Garbage collector and memory allocation strategy
Garbage collector and garbage collection algorithm
preface
I interviewed interns in April because I saw the JVM garbage collector and recycling algorithm in advance and answered this question. Ha ha, the interviewer directly told me that I could prepare three aspects. Today I want to ...
Posted by methomps on Mon, 07 Feb 2022 21:45:57 +0100
Local method stack, heap of JVM memory structure
3. Local Method Stack
The local method stack is java The virtual machine needs to provide memory space for some local methods when they are called, which refers to those that are not java How to write code, because
Ours java Code has some limitations, it sometimes can't deal directly with the bottom level of our operating system, so it need ...
Posted by Patrick3002 on Fri, 04 Feb 2022 18:28:02 +0100
String constant pool (String Table)
10. String constant pool (String Table)
Basic characteristics of String
String: a string, represented by a pair of "".
String s1 = "hguo"; // Definition of literal quantity
String s2 = new String("hello");
The String class is declared as final and cannot be inherited.
The Serializable String interface supports String serialization.
...
Posted by mastermike707 on Wed, 02 Feb 2022 21:21:40 +0100
Java Shutdown Hook scenario usage and source code analysis
I'm Chen PI. I'm an ITer of Internet Coding. I search "Chen Pi's JavaLib" on wechat. I can read the latest article at the first time and reply to [data], so I can get my carefully sorted technical data, e-books, interview data of front-line large factories and excellent resume template.
background
If you want to do some extra pr ...
Posted by dizel247 on Mon, 31 Jan 2022 05:50:12 +0100
Few people know that Java has four object reference methods
1, Why are there four kinds of references
01
At the beginning, when an object is not referenced (that is, there is no attribute / variable reference, for example, Object ob=new Object();ob=null;) It will be automatically recycled by the JVM. It is a strong reference before it is equal to null. For example, if you go to a restaurant for dinner ...
Posted by saiko on Mon, 31 Jan 2022 04:57:47 +0100
JVM Lesson 9: JVM tuning practice - use of arthas
arthas online troubleshooting tool
https://github.com/alibaba/arthas/blob/master/README_CN.md
step
Run our java program Start the jar file of arthas. We can see that the process number of the java program just running is 1, so type in the process number 1 and press enter. It will hang itself to this process Then you can use some command ...
Posted by temujinleal on Sun, 30 Jan 2022 08:41:04 +0100