JAVA design pattern lesson 3: structural design pattern

design pattern is a solution to various common problems in software design. This paper takes the face-to-face test questions as the starting point and introduces the common problems of design patterns. We need to master the principle, implementation, design intention and application scenarios of various design patterns and find out what problem ...

Posted by le007 on Fri, 17 Dec 2021 07:01:10 +0100

JAVA design pattern lesson 2: creative design pattern

design pattern is a solution to various common problems in software design. This paper takes the face-to-face test questions as the starting point and introduces the common problems of design patterns. We need to master the principle, implementation, design intention and application scenarios of various design patterns and find out what problem ...

Posted by ironman on Fri, 17 Dec 2021 05:58:56 +0100

Android kotlin: beginners can understand it. Analysis of real interview questions of aliqiu recruitment

1. Remote control story: Generic Girlfriend: I really want a universal remote control. Me: why don't I teach you to implement one with Kotlin's generics! Girlfriend: cut, you want to fool me to learn Kotlin. [white eyes] Me: it's really simple. I'm sure you'll see it at a glance. 1-1 generic class Me: This is a universal remote ...

Posted by dustbuster on Fri, 17 Dec 2021 01:05:23 +0100

Kotlin - coprocessor and operator overloading, interview video for Java senior engineer

Relationship and difference between coroutine and thread In OS, process is the smallest unit of resource allocation, and thread is the smallest unit of task scheduling. A coroutine is a * * "micro thread", or lightweight thread * *, inside a thread. Because threads are scarce resources in the OS, the number of threads on all OS platf ...

Posted by drums on Thu, 16 Dec 2021 23:41:44 +0100

Deep analysis of Spring MVC principle

1, spring mvc features 1. Review the servlet and jsp execution process Process Description: Request ServletProcessing business logicSet business Modelforward jsp Servletjsp Servlet parsing encapsulates html return 2. spring mvc features: spring mvc is essentially handled by Servlet and encapsulated on its basis, which simplifies the ...

Posted by bdamod1 on Thu, 16 Dec 2021 13:26:51 +0100

Development notes -- multithreading: synchronous lock, waiting for wake-up mechanism, blocking queue, synchronous data, concurrency tool class

synchronized and ReentrantLock locking synchronized locking public class Ticket implements Runnable { private int ticketNum = 1000; private static final Object obj = new Object(); @Override public void run() { while (true) { synchronized (obj) { if (ticketNum <= 0) { ...

Posted by mightymouse on Thu, 16 Dec 2021 11:06:58 +0100

Collect detailed sorting and interview questions

1. Common methods of collection interface and specific types of collections add(): adds an element to the list collection remove(Object o): removes the o element from the current collection Remove all (collection coll1): subtraction removes all elements in coll1 from the current collection size(): gets the collection size Iterator(): retu ...

Posted by tlavelle on Thu, 16 Dec 2021 03:14:30 +0100

The difference between var, let and const

The difference between var, let and const General differences: const defined variables cannot be modified and must be initialized. Variables defined by var can be modified. If they are not initialized, undefined will be output and no error will be reported. Variables defined by var have no block concept and can be accessed across favorit ...

Posted by flatpooks on Wed, 15 Dec 2021 20:09:29 +0100

The old question: how to customize the starter with one click in Spring Boot?

Spring Boot starter We know that Spring Boot greatly simplifies the initial construction and development process of the project, which are completed through the starter provided by Spring Boot. Pinda general permission system is developed based on Spring Boot, and some basic modules are starters in essence, so we need to have a comprehensive a ...

Posted by DeltaRho2K on Wed, 15 Dec 2021 16:05:04 +0100

Introduction to the usage of Java lambda expression. The algorithm is too important

import java.lang.FunctionalInterface; // this is functional interface @FunctionalInterface interface MyInterface{ // abstract method double getPiValue(); } public class Main { public static void main( String[] args ) { // declare a reference to MyInterface MyInterface ref; // lambda expression ...

Posted by elhama on Wed, 15 Dec 2021 11:18:34 +0100