Java interview questions, can the singleton pattern you wrote prevent deserialization and reflection?

preface Speaking of singleton mode, I believe everyone will not be unfamiliar. Because compared with other design patterns, it is relatively simple to implement a singleton pattern. Singleton pattern means that a class has only one instance. To obtain instances of a class, we often use the new keyword, but we should ensure that a class can on ...

Added by paulnaj on Sat, 29 Jan 2022 15:02:55 +0200

How do I kill a process name on Linux?

Use these Linux commands to force resignations to behave improperly The simplest word to interpret is "process", which is any application or program running an instance on your system. You may run multiple applications at the same time, such as browsing, listening to music dedicated to the terminal, and so on. There are many users of ...

Added by x684867 on Sat, 29 Jan 2022 12:51:35 +0200

Java interview 2021, Tomcat's immortality - Embedded

Author: Mr. King of Xiangxue classroom Reprint, please state the source! preface Tomcat is a very popular web server for deploying and running Java Web applications. Generally, we run our own web applications on a separate Tomcat instance. In fact, compared with this classic scheme, we can directly integrate the server runtime into the ap ...

Added by youknowho on Sat, 29 Jan 2022 12:29:19 +0200

Deeply understand the reflection mechanism and use principle in Java! Analyze the execution and use of invoke method in detail

The concept of reflection Reflection: reflection is one of the characteristics of Java. It allows running Java programs to obtain their own information and manipulate the internal properties of classes or objects Through reflection, you can get the information of the program or each type of member in the program living into a member at run ...

Added by alkhatareykha on Fri, 28 Jan 2022 17:00:20 +0200

True insight: NIO,epoll, multiplexing, better understanding of IO

There is a certain relationship between Java code and system call. Java is an interpretive language (Java is not valuable, but jvm is valuable). The Java code we write is finally compiled into bytecode, and then system call. In this paper, we still learn and understand io from a simple server program. BIO No matter which language, as long as ...

Added by ashishag67 on Thu, 27 Jan 2022 23:22:45 +0200

RocketMQ4.9.1 source code analysis - (HA module) Master Slave Slave report and message processing

Then the last one RocketMQv4.9.1 source code analysis - HA Master-slave Master reading and writing processing After answering the questions related to Master, this article continues to look at the code around some questions related to Slave. For slave, we have the following doubts: How can slave obtain the routing information of the masterH ...

Added by john_bboy7 on Wed, 26 Jan 2022 07:44:04 +0200

The most detailed source code analysis of Spring core IOC (different insights every time) 2

The most detailed source code analysis of Spring core IOC (different insights every time) The most important concepts of Spring are IOC and AOP. This article is actually to lead you to analyze the IOC container of Spring. Since we usually use Spring, how can we not have a good understanding of Spring? Reading this article will not make you a S ...

Added by gl_itch on Tue, 25 Jan 2022 18:56:53 +0200

Understand the use of completable future

preface There are only two ways to create a Thread: inherit the Thread or implement the Runnable interface. However, both methods have a defect that they do not return a value After Java 1.5, you can obtain a Future object containing the return value by submitting a Callable to the thread pool Limitations of Future interface When the Future ...

Added by morphy@6deex on Mon, 24 Jan 2022 21:53:29 +0200

Cultivate Python thinking -- Article 3 understand the difference between bytes and str

Python has two types of character sequences: bytes and str. The bytes instance contains the original data, that is, 8-bit unsigned (usually displayed according to the ASCII coding standard). a=b'h\x65llo' print(list(a)) print(a) >>> [104, 101, 108, 108, 111] b'hello' str instances contain Unicode code points (also known as code poi ...

Added by davanderbilt on Mon, 24 Jan 2022 19:52:07 +0200

Discussion on developing pytest plug-in based on automated testing framework

In this chapter, we introduce how to develop the pytest plug-in. In the last article, we introduced four python unit testing frameworks. It can be divided into two categories: one must have class inheritance, such as QTAF , and , unittest, and the other can have no class inheritance, such as nose/nose2 , and , pytest. For the framework with ...

Added by phast1 on Mon, 24 Jan 2022 16:32:12 +0200