JavaSE learning notes - object oriented
1. Overview of object-oriented thought
(1) Object oriented is an idea, which is based on process oriented. That is to say, object-oriented is to realize functions through objects, encapsulate functions into objects, and let objects realize specific details; This idea takes the data as the first and the method or algorithm as the second. This i ...
Added by soupy127 on Sat, 19 Feb 2022 21:18:35 +0200
Principle analysis of Java thread pool
I recently learned the "Java Concurrent Programming Practice" of geek time, and I have a new understanding of java thread pool and my own understanding, as well as some ideas, such as whether I can design a distributed thread pool, whether I can design a thread pool that can dynamically modify parameters, and whether I can design a th ...
Added by river001 on Sat, 19 Feb 2022 21:11:42 +0200
ThreadContext and ThreadLocal of shiro
problem
Today, I looked at the previous project written with shiro framework and looked at the source code carefully. Suddenly, I was curious. We usually use securityutils getSubject(); Method to obtain the of the current user. This class is a self-contained class under shiro, that is, shiro has encapsulated the logged in object to the i ...
Added by robtbs on Sat, 19 Feb 2022 20:02:46 +0200
SSM foundation Spring IOC container
IOC
What is IOC? IOC(Inverse of Control) is a design principle in object-oriented programming, which can be used to reduce the coupling between computer codes. Reverse the creation power of objects to the Spring framework!
In java, if a class wants to use the method of another class, it must create the object of this class in this class. ...
Added by veluit06 on Sat, 19 Feb 2022 19:25:17 +0200
API Foundation Day 12
Collection (Continued)
Operations between collections
Sets provide operations such as taking and merging sets, deleting intersection sets, judging inclusion subsets, etc
package collection;
import java.util.ArrayList;
import java.util.Collection;
import java.util.HashSet;
/**
* Operations between collections
*/
public class CollectionDem ...
Added by leo.bonnafe on Sat, 19 Feb 2022 19:15:33 +0200
Reflection introduction and simple cases
Reflection overview: reflection is the soul of the frame!
1.1 JAVA reflection mechanism
In the running state, you can know all the properties and methods of any class; For any object, you can call any of its methods and properties; This function of dynamically obtaining information and dynamically calling object methods is called the reflecti ...
Added by russthebarber on Sat, 19 Feb 2022 19:10:54 +0200
Kafka installation and deployment
Big data related knowledge points
1. Introduction to Kafka
Kafka is a high-throughput distributed publish and subscribe message system. It can process all action flow data in consumer scale websites. It has the ability of high performance, persistence, multi copy backup and horizontal expansion
Distributed system, easy to expand outward;At t ...
Added by kjelle392 on Sat, 19 Feb 2022 19:08:24 +0200
Finding the median of two positive arrays [difficult]
subject
Give two positively ordered (from small to large) arrays nums1 and nums2 of sizes m and n, respectively. Please find and return the median of these two positive arrays.
The time complexity of the algorithm should be O(log (m+n)).
Tips:
~~~~
num ...
Added by angus930 on Sat, 19 Feb 2022 17:21:24 +0200
What is the difference between String, StringBuffer and StringBuilder of Java foundation?
What is the difference between String, StringBuffer and StringBuilder of Java foundation?
1.String
1.1 String memory storage
Storage method: use char array inside the string to save the contents of the string. Each bit in the data stores a character. The length of char array is also the length of the string. For example, the storage method o ...
Added by harman on Sat, 19 Feb 2022 16:41:54 +0200
Spring notes and usage
@Configuration
explain
This is equivalent to using this class as the beans tag in Spring's XML configuration file, indicating that this is a configuration class
usage
Put the annotation on top of the class
package com.ledao.config;
import org.springframework.context.annotation.Configuration;
/**
* @author LeDao
* @company
* @create 20 ...
Added by DoctorT on Sat, 19 Feb 2022 16:39:27 +0200