Day08 static keyword and inheritance

Day08 static keyword and inheritance 1. Implementation of people class and test class package com.lagou.Day08; /** * Programming the encapsulation of People class */ public class People { //1. Privatize the member variable and use the private keyword to modify it private String name; private int age; private String country ...

Added by pdkv2 on Mon, 31 Jan 2022 16:13:18 +0200

Ctrip four sides: talk about the evolution process of Lambda expression!

preface The basis for using Lambda is that there must be a corresponding function interface (function interface refers to the interface with only one abstract method inside). This is consistent with the fact that Java is a strongly typed language, which means that you can't write Lambda expressions arbitrarily anywhere in the code. In fact, th ...

Added by willeh_ on Mon, 31 Jan 2022 14:57:24 +0200

An idea of using redis to realize distributed lock

In one work, there was a small accident. The result of a redis write and read method was always different from what was expected. After careful consideration, it was found that because all nodes in the cluster use shared caches and queues, resource competition may occur among nodes in some scenarios, There may be a "thread insecurity probl ...

Added by Fearsoldier on Mon, 31 Jan 2022 13:11:34 +0200

Elaborate on value passing, reference passing and address passing

Elaborate on value passing, reference passing and address passing 1 arguments and formal parameters Formal parameter: the parameter used when defining the function name and function body. It is used to receive the parameters passed in when calling the function. Actual parameters: when calling a parametric function, there is a data transfer r ...

Added by leon77 on Sun, 30 Jan 2022 18:17:17 +0200

Python tuple explanation

  Python tuple explanation Python tuple explanation Directory list   Definition of tupleTuple creationAccessing values in tuplesupdate tuple Delete tuple elementBasic tuple operationIndex, slice and matrixTuple loop traversalTuples and formatted stringsConversion between tuples and listsBuilt in tuple function Reference documents: https:// ...

Added by Fehnris on Sun, 30 Jan 2022 05:32:25 +0200

String function and character function

Character classification function Function returns true if its arguments meet the following conditions iscntrl any control character isspace blank characters: space ',' page feed '\ f', line feed '\ n', carriage return '\ r', tab '\ t' or vertical tab '\ v' isdigit decimal digits 0 ~ 9 isxdigit hexadecimal digit, including all decimal d ...

Added by skyagh on Sun, 30 Jan 2022 01:26:32 +0200

List, Set, data structure, Collections

Learning objectives Be able to tell the characteristics of the List set Be able to say common data structures Be able to tell the characteristics of array structure Be able to tell the characteristics of stack structure Be able to tell the characteristics of queue structure Be able to tell the structural characteristics of one-way linked list ...

Added by sanchan on Sun, 30 Jan 2022 00:31:20 +0200

go language foundation

structure go mod init xx initialization file Compile: go build XX Go generation exe file go run xx.go execution file file structure filename| - src file code ​ 1. Variables statement var age =12 //Declare variable var age int //The specified variable type is not assigned. The default value is 0 age :=12 //If you do not writ ...

Added by hermes on Sat, 29 Jan 2022 18:57:10 +0200

Four ways to generate random numbers in Java!

In Java, there are many scenarios for generating random numbers, so in this article, we will take an inventory of the four ways to generate random numbers, the differences between them and the corresponding scenarios of each way. 1.Random Random class was born in JDK 1.0. The random number it generates is pseudo-random number, that is, regula ...

Added by Cailean on Sat, 29 Jan 2022 14:41:44 +0200

How do I kill a process name on Linux?

Use these Linux commands to force resignations to behave improperly The simplest word to interpret is "process", which is any application or program running an instance on your system. You may run multiple applications at the same time, such as browsing, listening to music dedicated to the terminal, and so on. There are many users of ...

Added by x684867 on Sat, 29 Jan 2022 12:51:35 +0200