Communication program based on UDP protocol
1, What is UDP and what are its disadvantages?
UDP: user datagram protocol [connectionless protocol] Disadvantages: the safety and reliability of data cannot be guaranteed. Advantages: low consumption and high efficiency
2, Classes and common methods needed to establish network communication program based on UDP
UDP based netw ...
Posted by santrowithu on Fri, 03 Dec 2021 04:32:14 -0800
Sorting through Lambda expressions
Data sorting in memory
First, we define a basic class, and then we will demonstrate how to sort in memory according to this basic class.
@Data
@NoArgsConstructor
@AllArgsConstructor
public class Student {
private String name;
private int age;
@Override
public boolean equals(Object o) {
if (this == o) {
...
Posted by binit on Thu, 02 Dec 2021 22:22:46 -0800
Java data structure and algorithm
preface
Data structure and algorithm is to estimate the time cost and space cost when the program runs on a large number of data sets!
1, Data structure
summary
data structure refers to the collection of data elements with one or more specific relationships.
structure
selecting an appropriate data structure can i ...
Posted by badal on Thu, 02 Dec 2021 20:19:57 -0800
Springcloud from entry to mastery (full)
preface
This video learns through this connection and summarizes your notes Silicon Valley spring cloud framework development tutorial (spring cloud Alibaba microservice distributed architecture Spring Cloud)
What is microservice?
Microservice architecture is an architecture pattern, which divides a single application into a group of sma ...
Posted by wilburforce on Thu, 02 Dec 2021 19:12:39 -0800
Java lock mechanism
In the multithreaded environment, programs often have some thread safety problems. Therefore, Java provides some thread synchronization mechanisms to solve the safety problems, such as synchronized Lock and Lock lock.
Pessimistic lock and optimistic lock
We can roughly divide locks into two categories:
Pessimistic lock Optimistic lock
As ...
Posted by hmemnon on Thu, 02 Dec 2021 18:47:56 -0800
Artistic ~SM4 implementation of Java encryption and decryption
Concept introduction of domestic SM4 encryption and decryption algorithm
SMS4 algorithm is an encryption algorithm used in WAPI wireless network standard widely used in China. It is a 32 round iterative packet encryption algorithm with unbalanced Feistel structure. Its key length and packet length are 128. The algorithm used in the encryption ...
Posted by Graphi on Thu, 02 Dec 2021 18:47:41 -0800
java -- Design Pattern -- singleton and factory
Design pattern
Concept: a pattern is a summary of code design experience that is repeatedly used, known by most people, written by classification; It is not a syntax specification, but a set of solutions to improve code reusability, maintainability, readability, robustness and security.
Tip: the following is the main content of this a ...
Posted by FadeOut79 on Thu, 02 Dec 2021 18:32:08 -0800
Principle analysis of PriorityBlockingQueue
PriorityBlockingQueue is an unbounded array based priority blocking queue. The default length of the array is 11. Although the length of the array is specified, it can be expanded indefinitely until the resources are exhausted. Each time out of the queue, the element with the highest or lowest priority is returned. By default, elements are sort ...
Posted by djmc48 on Thu, 02 Dec 2021 18:22:51 -0800
Scala classes and singletons
1. Basic operation of class
1.1. Definition of class
Class or type is the abstraction of an objective class of things. A class keyword is used to describe the properties, behaviors, etc. of this kind of things in this class.
In other words, a kind of things described in computer language, that is, classes, are identified by the keyword class ...
Posted by sethadam1 on Thu, 02 Dec 2021 18:04:58 -0800
Interfaces and abstract classes in Java
1, Introduction
Abstract class: a class modified by abstract can be called an abstract class. Abstract classes can have abstract methods, that is, methods decorated with abstract. Such methods have no specific implementation structure, but only a definition.
Interface: a class like structure formed by replacing class with interface. The methods ...
Posted by seansd on Thu, 02 Dec 2021 16:19:26 -0800