• 040_ array


    catalog array Definition of array Array creation Characteristics of arrays Use of arrays Two dimensional array Arrays class Bubble sort Simple optimization Sparse array array Definition of array An array is an ordered collection of data of the same type. Array creation //Static initialization int[] nums1 = {1,2,3}; //Dynamic initialization int[] nums2 = new […]

  • Example of using resource as attribute operation in spring


    This article describes how to use resource as an attribute operation in spring. For your reference, the details are as follows: 1. Configuration file <?xml version=”1.0″ encoding=”GBK”?> <beans xmlns:xsi=”” xmlns=”” xmlns:p=”” xsi:schemaLocation=””> <bean p:res=”classpath:book.xml”/> </beans> 2. Attribute file <?xml version=”1.0″ encoding=”GBK”?> < Computer Book list > < book > < title > crazy Java […]

  • DP of algorithm — autumn leaf collection


    Autumn leaves collection difficultysecondary Xiaokou went out for an autumn outing. On the way, he collected some red and yellow leaves. He used these leaves to organize a collection of autumn leavesleaves, stringleavesContains only lowercase charactersrandy, where charactersrRepresents a red leafyA yellow leaf is a leaf.For the sake of beauty and tidiness, Xiaokou wants to […]

  • CAS of Java multithreading


    CAS (Compare and Swap) CAS has three operands: memory value m, expected value E, and update value U. If and only if the memory value m and the expected value E are equal, change the memory value m to u, otherwise nothing will be done. 1. Application scenarios of CAS CAS is only suitable for […]

  • Java merge list method code example


    This article mainly introduces the Java merge list method code example, the article through the example code introduction is very detailed, to everybody’s study or the work has certain reference study value, needs the friend may refer to List includes the list interface and all implementation classes of the list interface. Because the list interface […]

  • Introduction to CPU


    1. Von Neumann architecture Most modern computers are based on von Neumann architecture, which has the following characteristics: All data and instructions processed by computer are represented by binary numbers; Instructions and data are stored in the same memory without distinction; Execute each instruction of the program in sequence; Computer hardware consists of arithmetic unit, […]

  • Introduction to JAVA memory leak


    Memory management is one of the most important advantages of Java. You just need to create objects, and the Java garbage collector will automatically allocate and release memory. However, the situation is not so simple because memory leaks often occur in Java applications. This chapter explains what memory leaks are, why they occur, and how […]

  • Detailed explanation of actual combat cases of AspectJ framework


    This paper describes the AspectJ framework. For your reference, the details are as follows: Environment variable configuration Classpath is configured as: .;d:\aspectj1.8\lib\aspectjrt.jar;D:\Program\Java\jdk1.8.0_162\lib\dt.jar;D:\Program\Java\jdk1.8.0_162\lib\tools.jar; Path to be configured as: d:\aspectj1.8\bin Two codes 1 JavaBean package; public class Hello { //Define a simple method to simulate the business logic method in application public void foo() { […]

  • String of algorithm — longest palindrome substring


    Longest Palindromic Substring difficultysecondaryGiven a strings, foundsThe longest palindrome string in. You can assume thatsThe maximum length of is 1000. as everyone knows,Palindrome substring is a certain axis as the center, left and right mirror symmetryHow to find the longest palindrome substring in S? 1. Violent cracking Brute force cracking is the most easy way […]

  • Spring data releases the first version after changing the version management scheme: 2020.0.0


    On October 28, 2020, the first version of spring data since the version control scheme was changed was released. The version number is 2020.0.0, code named Ockham. Before that, version numbers were marked with names, such as Neumann release. The content of this release includes these main highlights: The latest version naming rules, as well […]

  • Java8 default methods principle and example explanation


    This article mainly introduces the java8 default method default methods principle and example detailed explanation, the article through the example code introduction is very detailed, has the certain reference study value to everybody’s study or the work, needs the friend may refer to Java 8 introduces a new language feature, default methods. Default methods enable […]

  • Java security framework


    The article is mainly divided into three parts1. The architecture and core components of spring security are as follows: (1) authentication; (2) authority interception; (3) database management; (4) authority caching; (5) custom decision making; and;2. To build and use the environment, the current popular spring boot is used to build the environment, and the actual […]