Analysis of Eight Posture Writing Methods for Single Case Mode

Catalog What is the singleton mode? Advantages of the singleton pattern Single Case Mode Implements the Whole Idea Process Scenarios for Single Case Mode Eight Posture Writings for Single Case Mode Application of singleton mode in JDK source code Single Case Mode Summary ...

Added by Gamic on Tue, 26 Nov 2019 03:58:03 +0200

Java multithreading - ThreadLocal

ThreadLocal ThreadLocal is provided by the JDK package. It provides thread local variables. That is, if you create a ThreadLocal variable, each thread accessing the variable will have a local copy of the variable. When multiple threads operate this variable, they actually operate the variables in their own local memory, thus av ...

Added by jsantama on Mon, 25 Nov 2019 17:37:26 +0200

Transform JAVA, add Chinese keywords to OpenJDK10

Compilation reference of OpenJDK10: Compiling OpenJDK10 on WSL Magic JAVA, add Chinese keywords, not much change, just change the source code of javac, which belong to java.compiler and jdk.compiler Chinese key words, I used my own style, do not like, you can modify. jdk10langtoolssrcjava.compilershareclassesjavaxlangmodelSourceVersion.java Cha ...

Added by conspi on Sat, 16 Nov 2019 21:20:08 +0200

Strengthen Singleton with private constructor or enumeration type

Refer to Effective Java version 3, Joshua J. Bloch The guy who participated in JDK writing saw his name when he read the source code of Collection last time, and then turned over the book. He wrote it! 1. Common: public class Singleton {private static final Singleton INSTANCE=new Singleton();private Singleton(){ //If there is no ...

Added by mattd123 on Thu, 14 Nov 2019 21:16:16 +0200

Shy, there are so many positions for Java string stitching

Second Brother, when I was a sophomore this year, I read a passage in the Alibaba Java Development Manual that you shared that said, "In a loop, it is better to use StringBuilder's append method for stitching strings than the + operator."Why on earth, I always use the'+'operator!Can I write an article to analyze when my brother is fr ...

Added by jacomus on Thu, 14 Nov 2019 00:43:09 +0200

Application of Maven Profile

maven's profile app will appear more or less in mid-sized and large companies. If you're new to the maven profile, you probably don't care what it does, just like me. Even though I've seen it many times, I don't need to configure it myself, just be active. But once the problem occurs, you probably won't find any problems. Basic concepts Profile ...

Added by Bunyip on Fri, 08 Nov 2019 04:21:49 +0200

IDEA uses the native java environment

idea has its own jre in its installation package. idea uses its own jre by default If you want to use your own jdk, you can find idea.bat in bin directory :: --------------------------------------------------------------------- :: Locate a JDK installation directory which will be used to run the IDE. :: Try (in order): IDEA_JDK, idea%BITS%.exe. ...

Added by rreynier on Wed, 06 Nov 2019 17:14:01 +0200

Java design pattern series - enjoy element pattern (structural type)

I. overview Sharing mode: "sharing" is the meaning of sharing, which means that one thing is shared by all, and this is the ultimate purpose of the mode. Sharing element mode is similar to singleton mode in that only one object is generated to be shared. There is a problem here, that is, the modification of shared objects. In order to ...

Added by Monkey-Moejo on Tue, 05 Nov 2019 11:42:10 +0200

Java design pattern series sharing pattern

I. overview Sharing mode: "sharing" is the meaning of sharing, which means that one thing is shared by all, and this is the ultimate purpose of the mode. Sharing element mode is similar to singleton mode in that only one object is generated to be shared. There is a problem here, that is, the modification of shared objects. In order to ...

Added by mattkenefick on Sun, 03 Nov 2019 00:29:36 +0200

A chain building exception between jsch client and sshd server

The following exception indicates that the encryption algorithm does not meet the key size.   Find the reasons from the Internet as follows, which may be the following. This kind of error may be reported if the versions of both sides of the jdk are inconsistent. But in fact, I use the same local jdk as 1.8-u191. Take a closer look, the th ...

Added by lala on Thu, 31 Oct 2019 06:03:55 +0200