day14 method principle method naming method composition method overloading
catalogue
What is the method
Method definition and call
Method overloading
Command line parameters
Variable parameter
recursion
What is the method?
Method is an ordered combination of steps to solve a class of problems Methods are contained in classes or objects Methods are created in the program and referenced elsewhere Use a piece ...
Added by THESiUS on Thu, 17 Feb 2022 03:42:36 +0200
Java basic summary method, array
method
A Java method is a collection of statements that together perform a function; Method is an orderly combination of steps to solve a class of problems, which is contained in classes and objects; Methods are created in the program and referenced elsewhere
Method definition and call
definition
Java method is similar to functions in oth ...
Added by poppy28 on Thu, 17 Feb 2022 03:25:34 +0200
Detailed explanation of Java Lambda expression
What is a Lamdba expression
According to Baidu:
lambda expression is an anonymous function. lambda expression is based on λ The name of calculus directly corresponds to the lambda abstraction. It is an anonymous function, that is, a function without a function name. Lambda expressions can represent closures (note the difference from ...
Added by aspguy on Wed, 16 Feb 2022 16:20:20 +0200
Java collection framework (Map)
Map collection
Features of Map interface
Used to store any key value pairKey: no repetition, no subscriptValue: unordered, no subscript, duplicate allowed Common methods of Map interface
V get(Object key): returns the value corresponding to the specified key object in the Map set. V indicates the data type of the valueV put(K key, V va ...
Added by mattotto77 on Wed, 16 Feb 2022 14:15:28 +0200
C + + preliminary core Programming Chapter 5: polymorphism and virtual function classes
C + + preliminary core Programming Chapter 5: polymorphism and virtual function classes
1. Summary of polymorphism
Polymorphism literally means multiple forms. Polymorphism is used when there is a hierarchy between classes and classes are associated through inheritance. C + + polymorphism means that when calling member functions, di ...
Added by rigi2 on Wed, 16 Feb 2022 12:22:30 +0200
JAVA foundation 05 - object oriented
preface
This article is compiled from the notes in the process of personal learning and review, which is suitable for readers to get started and review quickly.
1, Classes and objects
Class 1.1
A class is a class. A class creation object is our commonly used new object
1.2 reference type
In addition to the eight basic types of dat ...
Added by xwhitchx on Wed, 16 Feb 2022 10:13:50 +0200
Lock free multithreading -- a class of atomic related atoms
preface
java.util.concurrent.atomic also provides some concurrency tool classes, which are divided into five categories:
Update base types atomically
AtomicInteger: integer atomic classAtomicLong: long integer atomic classAtomicBoolean: Boolean atomic class Atomic referenceAtomic arrayField UpdaterAtomic accumulator
1. Atomic integer
Tak ...
Added by it2051229 on Wed, 16 Feb 2022 09:59:20 +0200
A preliminary understanding of map based on Go language
map of Go language foundation
The hash relation in the container is used to implement the hash relation.
map
map is an unordered key value based data structure. map in Go language is a reference type and must be initialized before it can be used.
map definition
The definition syntax of map in Go language is as follows:
map[KeyType]ValueTy ...
Added by sgaron on Wed, 16 Feb 2022 09:56:58 +0200
Third set of arrays
Basic concept and function of array
java array stores a group of data with the same data type. The space in memory is continuous. Once the length is given, it cannot be changed
Arrays are reference data types (objects), but they can store basic types or reference types
Array creation
Declaration array
Int means that the data type that can ...
Added by Tjk on Wed, 16 Feb 2022 09:12:55 +0200
Go1.18 new feature: deprecate strings Title Method, change a new pit!
Hello, I'm fried fish.I've been watching go1 18. When releasing notes, I found that the Title Method of strings and bytes standard library was Deprecated. Why?Today's article will be read by fried fish and everyone.introduceHere, take the strings standard library as an example, strings The title method maps Unicode letters at the beginning of a ...
Added by Warmach on Wed, 16 Feb 2022 06:42:58 +0200