Character operation
Character operation
Encoding and decoding
Encoding is to convert characters into bytes, while decoding is to recombine bytes into characters.
If the encoding and encoding process use different encoding methods, there will be garbled code.
In GBK coding, Chinese characters occupy 2 bytes and English characters occupy 1 byte;In UTF-8 coding, ...
Added by davemwohio on Thu, 24 Feb 2022 13:16:26 +0200
Concurrent programming 7: deep understanding of synchronized
In depth understanding of synchronized (Part 1)
Thread safety problems caused by Java shared memory model
public class SyncDemo {
private static int count = 0;
public static void increment(){
count++;
}
public static void decrement(){
count--;
}
public static void main(String[] args) throws InterruptedException {
Thread t1 = new T ...
Added by highrevhosting on Thu, 24 Feb 2022 12:53:08 +0200
[Spring Boot] how to customize the Spring Boot Starter
This article introducesWe all know that the Spring Boot project consists of starters, such as web starters, redis starters and so on.By introducing the corresponding starter through maven, we can perfectly use the integrated spring mvc or redis without configurationSo how do we customize a starter?This article will show you how to use the auto ...
Added by lailaigogo on Thu, 24 Feb 2022 12:46:43 +0200
LeetCode 1706. Where does the ball meet? Multiple solutions to one problem
1706. Where does the ball meet Problem solution
Title Source: 1706. Where does the ball meet
2022.02.24 one question per day
Daily question column address: LeetCode daily problem solution is being updated ❤️💕
Today's topic is easier. After solving the problem, I'll pack my bags and go back to school tomorrow. I hope it's easy tomorrow, heh ...
Added by fredcool on Thu, 24 Feb 2022 12:28:42 +0200
[high concurrency] deeply analyze the Callable interface
Hello, I'm glacier~~
This article is pure dry goods. It deeply analyzes the Callable interface from the perspective of source code. I hope you can step down, open your IDE, and follow the article to see the source code. I believe you will gain a lot.
1. Introduction to callable interface
The Callable interface is jdk1 5 new generic interface ...
Added by mastercjb on Thu, 24 Feb 2022 12:23:23 +0200
SpringBoot configuration file application YML database information encryption
In the process of developing program system, we often need to consider the problem of system security,
Like this, it's like your database is running naked, isn't it? Maybe someone quietly deleted the database and let you run away? Therefore, the plaintext password cannot appear in the configuration file. Next, I will give you a detailed in ...
Added by minus4 on Thu, 24 Feb 2022 12:07:08 +0200
Basic content of Java se
JavaSE Basics
Java comments
public class Helloworld {
public static void main(String[] args) {
System.out.println("hellowprld");
//Output a Hellowprld
/*I'm a multiline comment
*/
/**
*
* I'm a document comment
*/
}
}
identifier
public class Demo01 {
public ...
Added by bubblocity on Thu, 24 Feb 2022 11:58:56 +0200
Java process control
Java process control
Scanner object
We use the Scanner class to get the user's input
Basic syntax: Scanner s=new Scanner(System.in);
Get the input string through the next() and nextLine() methods of Scanner class. Before reading, we generally need to use hasNext() and hasNextLine() to judge whether there is still input data
Scanner object ...
Added by Jeyush on Thu, 24 Feb 2022 11:56:16 +0200
java objects and classes
catalogue
1, Class definition
2, this reference
3, Construction method and object initialization
1. Construction method
2. Object initialization
4, Encapsulation
5, Package
1. Concept of package
2. Import classes in package
3. Custom package
4. Common packages
6, static member
1. static modifier member variable
2. Static member me ...
Added by cdc5205 on Thu, 24 Feb 2022 11:51:55 +0200
Dependency injection learning notes
Ioc overview
Ioc(Inversion Of Control) is translated as control inversion
First, make it clear that the control without inversion is "active control"
Active control: all the codes we wrote before are active control, which means that we can instantiate whatever objects are needed during the running of the programInversion of control ...
Added by Jack McSlay on Thu, 24 Feb 2022 11:50:27 +0200