1 final keyword 1.1 Definition The final keyword represents final and unchangeable. 1.2 Usage Four common uses: 1. Can be used to modify a class public final class class name { //… } Meaning: The current class cannot have any subclasses, but it can have a parent class. (eunuch type) Note: If a class is […]
Tag: final
I finally understand the memory structure of Java8 and no longer have to worry about the method area and constant pool!
Please read the original text directly Original link: I finally understand the memory structure of Java 8, and I no longer have to worry about the method area and constant pool! ————————————————– ————————————————– ————————– Note: The following memory structure is for JDK8 version java8 memory structure diagram The difference between virtual machine memory and local […]
Upgrade the fruit inventory system using jdbc technology (final version of the backend, not including the frontend)
1. Configuration dependencies <dependencies> <dependency> <groupId>org.projectlombok</groupId> <artifactId>lombok</artifactId> <version>1.18.10</version> </dependency> <dependency> <groupId>junit</groupId> <artifactId>junit</artifactId> <version>4.12</version> <scope>test</scope> </dependency> <dependency> <groupId>mysql</groupId> <artifactId>mysql-connector-java</artifactId> <version>8.0.28</version> </dependency> <dependency> <groupId>com.alibaba</groupId> <artifactId>druid</artifactId> <version>1.2.16</version> </dependency> </dependencies> 2. Fruit entity class package com.csdn.fruit.pojo; import lombok.AllArgsConstructor; import lombok.Data; import lombok.NoArgsConstructor; import java.io.Serializable; @Data @NoArgsConstructor @AllArgsConstructor public class Fruit implements Serializable { private Integer fid; private String fname; […]
Caused by: java.lang.reflect.InaccessibleObjectException: Unable to make protected final java.lang.C
Recently, I encountered such a problem when learning JDK17. SpringBoot failed to start. The log is as follows: Exception in thread “main” java.lang.IllegalArgumentException: Unable to instantiate factory class [com.ctrip.framework.apollo.spring.boot.ApolloApplicationContextInitializer] for factory type [org.springframework.context.ApplicationContextInitializer] at org.springframework.core.io.support.SpringFactoriesLoader$FailureHandler.lambda$throwing$0(SpringFactoriesLoader.java:650) at org.springframework.core.io.support.SpringFactoriesLoader$FailureHandler.lambda$handleMessage$3(SpringFactoriesLoader.java:674) at org.springframework.core.io.support.SpringFactoriesLoader.instantiateFactory(SpringFactoriesLoader.java:231) at org.springframework.core.io.support.SpringFactoriesLoader.load(SpringFactoriesLoader.java:206) at org.springframework.core.io.support.SpringFactoriesLoader.load(SpringFactoriesLoader.java:160) at org.springframework.boot.SpringApplication.getSpringFactoriesInstances(SpringApplication.java:459) at org.springframework.boot.SpringApplication.getSpringFactoriesInstances(SpringApplication.java:455) at org.springframework.boot.SpringApplication.<init>(SpringApplication.java:273) at org.springframework.boot.SpringApplication.<init>(SpringApplication.java:252) at com.zzz.train.business.BusinessApplication.main(BusinessApplication.java:20) Caused by: […]
Map query (Do You Know The Way to San Jose?, ACM/ICPC World Finals 1997, UVa511) rust solution
There are n maps (known names and coordinates of two diagonal endpoints) and m place names (known names and coordinates), and q queries. Each map is a rectangle with sides parallel to the coordinate axes, and the scale is defined as the height divided by the width. Each query contains a place name and level […]
Exceptions in java, and handling after exceptions [try, catch, finally]
1. Abnormal concept Exception: refers to an abnormal situation that occurs during the execution of the program, which will eventually cause the JVM to stop abnormally. Note: In object-oriented programming languages such as Java, the exception itself is a class. To generate an exception is to create an exception object and throw an exception object. […]
Convert the Boolean judgment expression into a conditional Javabean (the conditional structure can theoretically iterate through countless levels), and use it to judge the Boolean result finally generated by the form submission parameters.
Without further ado, let’s get into the code. The code format is wrong, and for some reason, it can only be copied bit by bit. public List<ActBPMNSequenceFlowConditionExpression> parseConditionExpressionToList(String conditionExpressionStr, Boolean ifJustExtra) { //1. Initialize variables //1.1 The aggregated conditional expression of the current flow direction to be finally returned List<ActBPMNSequenceFlowConditionExpression> conditionExpressions = new ArrayList<>(); //1.2 […]
Cool, I finally implemented the selenium image slider verification code! [With code]
Due to various reasons, we were unable to achieve the goal of the vision. Recording the intermediate results here can be regarded as an ending. This article is mainly about individual cases of using selenium to solve the slider verification code. Ideas: Use selenium to open the specified website in the browser Download incomplete block […]
ONEPIECE! Programming environment and preprocessing – the final chapter of C language
Time flies so fast, it has been three or four months since the first blog, and we have finally ushered in the final chapter of C language – programming environment and preprocessing! Come on friends, ONEPIECE is right in front of you~ Table of Contents 1. The “translation environment” and “running environment” of the program […]
Use of Hospital Facilities, ACM/ICPC World Finals 1991, UVa212 rust solution
There are n (n≤10) operating rooms and m (m≤30) recovery rooms in the hospital. Each patient is first assigned to an operating room and then to a recovery room after surgery. The time from any operating room to any recovery room is t1, and the time to prepare an operating room and recovery room is […]