Java cultivation Guide: high frequency source code analysis reading notes - implementation collection class of Java data structure

1, Arrays tool class From Java util. Arrays, various methods used to process arrays. 1.1 List asList(T... a) It is used to return a fixed size List supported by a custom array. Although a List is returned here, it is an internal class in Arrays. The main methods here are: There are no add and remove methods, so it does not support add and ...

Added by liquefi on Mon, 21 Feb 2022 09:08:42 +0200

#{} how to prevent SQL injection? What is its underlying principle?

1, The difference between ${} and #{} in MyBatis 1.1 ${} and #{} presentations Database data: dao interface: List<User> findByUsername(String username); List<User> findByUsername2(String username); Mapper.xml: <!-- use#{} --> <select id="findByUsername" parameterType="java.lang.String" resultType="com.lscl.entity ...

Added by samuraitux on Mon, 21 Feb 2022 08:00:16 +0200

Knowledge of JDBC

1. Concept: Java database connectivity, Java database connection, Java language operation database JDBC essence: it is actually a set of rules defined by the official (sun company) to operate all relational databases, that is, interfaces. Each database manufacturer implements this interface and provides database driver jar package. We can use ...

Added by Pehape on Mon, 21 Feb 2022 06:58:21 +0200

Deeply cultivate Java multithreading - analyze the difference between Runnable interface and Callable interface

Runnable interface source code: @FunctionalInterface public interface Runnable { // The return value of this run() method is void. There is no exception declaration for the detected exception. Exceptions can only be caught internally public abstract void run(); } Callable interface source code: @FunctionalInterface public interf ...

Added by Installer on Mon, 21 Feb 2022 06:29:02 +0200

Deepening and improving JAVA foundation [Chinese]

data structure Main contents: Introduction to data structure linear structure tree structure Introduction to data structure 1 what is a data structure In short, a data structure is a container that stores data in a specific layout. This "layout" determines that a data structure is efficient for some operations and inefficient for ...

Added by ineedhelp on Mon, 21 Feb 2022 06:29:31 +0200

Common java troubleshooting commands and tools under Linux

Most of the environments described in this article are based on linux. For a program, under Linux, we can find the corresponding process ID according to the program response information: ps -ef | grep java | grep -v grep | |awk '{print $2}' In this way, we can get the process id and PID of the corresponding program After obtaining the PI ...

Added by ledtear on Mon, 21 Feb 2022 05:37:52 +0200

[Kaka on Java] Java generics

   students, today let's learn about generics in Java. Generics are widely used in object-oriented programming and various design patterns. Generic concept    generic, i.e. "parameterized type". When referring to parameters, the most familiar thing is that there is a formal parameter when defining the method, ...

Added by asukla on Mon, 21 Feb 2022 05:13:15 +0200

Kill Date. Java8 LocalDate smells good

brief introductionWith lambda expressions, stream s and a series of minor optimizations, Java 8 has launched a new date and time API.The deficiency of Java in dealing with date, calendar and time: Java util. Date is set as a variable type, and SimpleDateFormat's non thread safety makes its application very limited. Then add new features to java ...

Added by webwalker00 on Mon, 21 Feb 2022 03:43:09 +0200

Java 09 (object oriented java core)

Object oriented and process oriented Process oriented: focus on causality without independence. Small individuals are formed by causality, and small individuals are formed as a whole by causality. Focus on the process. Object oriented: focus on objects. It doesn't care about how the underlying object is implemented, but only what the object c ...

Added by devassocx on Mon, 21 Feb 2022 03:36:39 +0200

Challenge one day to develop a front-end and back-end applet system | open source, out of the box

A little friend came to me to develop a system. This time he wanted to test my efficiency. He met this condition for the first time. 2000 for one week, 4000 for three days and 5000 for one day. That's what I said. What am I dragging on? After the completion of the system, we discussed with him and refunded part of his cost. The source code ...

Added by steveryan on Mon, 21 Feb 2022 03:00:21 +0200