Let's talk about the synchronized keyword

Basic use of synchronized Object lock Custom object lock /** * Object lock example 2 */ public class SyncObjLock2 implements Runnable{ private static SyncObjLock2 instance=new SyncObjLock2(); private Object lock1=new Object(); private Object lock2=new Object(); /** * You can see that using sync will cause threads to ...

Posted by mandukar on Sun, 13 Feb 2022 09:43:53 +0100

Preparation interview diary (4.3) - (framework. Mybatis)

I am a graduate of 21 years with one year's work experience. My resume and professional skills are as follows. Now I review and prepare for the interview according to my resume and knowledge. Record date: January 15, 2022 Most knowledge points are only briefly introduced, and the specific contents are reviewed in detail according to the re ...

Posted by subodh_dg on Sat, 12 Feb 2022 06:47:59 +0100

Interview: virtual machine stack 5 consecutive questions, I'm happy to hear it

On the way to the interview "Didi, Didi..." master, where are we? I'm in a hurry for an interview. Master: it's almost there. It's the next intersection. I'm really convinced by these people. I can't drive all the way in. Listening to the driver's complaints, I can't help thinking of a limerick poem: the tail lights are red all o ...

Posted by shawjames on Sat, 12 Feb 2022 04:46:48 +0100

Analyze the implementation principle of thread pool (pooling Technology) from the source code

Thread pool is a very important knowledge point and a typical application of pooling technology. I believe many people have the experience of using thread pool, but do you know the implementation principle of thread pool? In this article, we will explore the source code of thread pool. Origin of thread pool Background: with the upgradi ...

Posted by digitalhuman on Sat, 12 Feb 2022 02:43:50 +0100

Discussion of some issues with Spring transactions

When a spring transaction is mentioned, it is reminiscent of four basic characteristics, five isolation levels and seven communication characteristics. I'm sure most people know this, but knowing it's one thing, and using it well is another. When using Spring transactions, I've encountered several serious issues, so I'll make a self-summary her ...

Posted by Kibit on Fri, 11 Feb 2022 22:24:52 +0100

android development classic actual combat! Remember to regard each interview as experience accumulation, I will collect it for respect first

With the development of the Internet, the public has more understanding of the profession of programmer. In addition to high salary, there is too much pressure, black and white reversal, irregular work and rest and so on, which are also things that a programmer must experience. Most programmers are quiet and steady. If they have any question ...

Posted by CyberShot on Fri, 11 Feb 2022 00:28:09 +0100

Java collection source code analysis: ArrayList

After so much preparation, it finally started. Ha, ArrayList Kaigan! ArrayList should be the most frequently used collection class. Let's take a look at how the document introduces it. We can know that ArrayList is actually a replica of Vector, but it only removes thread safety. ArrayList is a List implementation that can be dynamically resize ...

Posted by magie on Thu, 10 Feb 2022 17:56:56 +0100

Python basic interview questions

1. Comparison between PHP, C + +, Python and other languages such as C #? C language   C language has the characteristics of both high-level language and assembly language. It is a structural language. C language application pointer: it can directly operate close to the hardware, but the pointer operation of C is not protected, which also ...

Posted by ghost007 on Wed, 09 Feb 2022 23:12:37 +0100

Design mode - singleton mode

Singleton mode 1. Overview of singleton mode For some classes of a software system, only one instance is very important. For example, a system can only have one window manager or file system, only one timing tool, etc. How to ensure that a class has only one instance and that the instance is easy to access? Defining a unified global variable ...

Posted by mickro on Wed, 09 Feb 2022 17:57:53 +0100

A series of tough interviews -- what's the difference between redis distributed locks and zk distributed locks?

  Tags: [advanced] [Redis] [ZooKeeper] 1. Ask What is the difference between redis distributed locks and zk distributed locks? 2. Analysis This question has high requirements for the interviewer. It should not only understand the implementation method, but also master the principle. So the answer to the question is divided into many levels ...

Posted by alvinchua on Wed, 09 Feb 2022 13:55:27 +0100