Category:Java

  • 040_ array

    Time:2020-12-1

    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 https://www.bilibili.com/video/BV12J41137hu/?p=51 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

    Time:2020-12-1

    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=”http://www.w3.org/2001/XMLSchema-instance” xmlns=”http://www.springframework.org/schema/beans” xmlns:p=”http://www.springframework.org/schema/p” xsi:schemaLocation=”http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-4.0.xsd”> <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

    Time:2020-11-30

    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

    Time:2020-11-30

    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

    Time:2020-11-30

    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

    Time:2020-11-29

    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

    Time:2020-11-29

    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

    Time:2020-11-29

    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 Hello.java package org.crazyit.app.service; public class Hello { //Define a simple method to simulate the business logic method in application public void foo() { […]

  • String of algorithm — longest palindrome substring

    Time:2020-11-28

    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

    Time:2020-11-28

    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

    Time:2020-11-28

    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

    Time:2020-11-27

    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 […]