thread [6] - thread pool

thread [6] - thread pool 1. Thread pool concept It is a container that contains several threads. Usually a project has only one thread pool. When the program starts, it loads threads. When you need threads, you take threads from the thread pool and process tasks. When you use them, you will not de ...

Posted by danharibo on Mon, 12 Aug 2019 05:08:11 -0700

Java can also be executed directly without compiling?

We all know that java is a static language, that is to say, if you want to execute a java program, you must compile it first and then execute it. So why does this article say that java can be executed without compiling? Actually, this is a new feature added in OpenJDK11 to enable the java source code of a single file to be executed directly wit ...

Posted by jcantrell on Sun, 11 Aug 2019 06:19:30 -0700

Java Reference Type Principle in-depth analysis, read the article, 90% of the people are in the collection

There are four reference types in Java (there are actually other reference types such as FinalReference): strong reference, soft reference, weak reference, virtual reference. Strong references are Object a = new Object(), which we often use; in this form, there is no corresponding Reference class in Java. This article mainly analyses the imple ...

Posted by ca87 on Fri, 09 Aug 2019 01:11:07 -0700

Java Core-5. Inheritance-Detailed Reflection Mechanism

V. Inheritance Inheritance Definition: Constructing New Classes Based on Existing Classes Reflection Definition: The ability to discover more classes and attributes while the program is running Polymorphic Definition: An object variable can indicate many actual types of phenomena Dynamic Binding Definition: The phenomenon of automatically choo ...

Posted by naomi385 on Thu, 08 Aug 2019 20:29:32 -0700

Java design pattern optimization - singleton pattern

Overview of Singleton Patterns Singleton pattern is an object creation pattern used to generate specific instances of a class. Using the singleton pattern ensures that only one instance of the singleton class is generated throughout the system. There are two main benefits: For frequently created objects, the creation time after the first inst ...

Posted by cedricm on Wed, 07 Aug 2019 06:06:39 -0700

redis concurrent read and write locks, using Redisson to implement distributed locks

Links to the original text: https://blog.csdn.net/l1028386804/article/details/73523810 1. Reentrant Lock Redisson's distributed reentrant lock RLock Java object implements the java.util.concurrent.locks.Lock interface and also supports a ...

Posted by etoast on Sun, 04 Aug 2019 01:04:56 -0700

Java Reflection Mechanism 2019/8/2

I. Introducing the Concept of Reflection In the running state, for any class, we can wait until the class has any methods and attributes; for any object, we can call until its methods and attributes. We call this function of dynamic acquisition of object information and invoking object methods a refle ...

Posted by webtailor on Fri, 02 Aug 2019 00:37:27 -0700

Input stream of IO stream in Java | Lebyte

Dear friends of Lebyte, Xiaole has come to share Java technology articles again. I wrote about the IO stream in the last article. This article focuses on the input stream and the output stream next time. I. Input stream Byte streams and character streams operate in almost the same way, except that the data units of operations are different. Byt ...

Posted by xeelee on Wed, 31 Jul 2019 07:28:43 -0700

Recommend an Ali open source Java diagnostic tool, easy to use explosive!

What's the ghost of Arthas? Arthas is an Alibaba Open Source Java online diagnostic tool, which is very powerful and can solve many online problems that are not easy to solve. Arthas diagnoses using command-line interaction mode, supporting JDK6+, Linux, Mac, Windows operating systems, commands also support the use of tab keys to automatically ...

Posted by admin101 on Tue, 30 Jul 2019 17:57:05 -0700

Java Foundation reviews keywords, singleton design patterns, basic classes, and internal classes

Java Basic Review (3) final keyword The final-modified content can no longer be changed. final-modified classes cannot have subclasses, that is, they cannot be inherited When modifying a member variable, the variable is an end value and cannot be changed any more. It needs to be defined with an initi ...

Posted by ilikephp on Sun, 28 Jul 2019 23:57:09 -0700