How to use code blocks?

Basic introduction A coded block, also known as an initialization block, is a member of a class [that is, a part of a class], which is similar to a method. It encapsulates logical statements in the method body and is surrounded by {}. But unlike methods, there is no method name, no return, no parameters, only method body, and it is not explici ...

Posted by SapAuthor on Thu, 24 Feb 2022 12:24:53 +0100

Python Basics - Introduction to file mode, basic file operation process and detailed explanation of file operation mode (T mode)

Daily test 1,Three characteristics of elements in a set Must be of immutable type disorder No repetition 2,What is the purpose of the collection? Relational operation duplicate removal 3,An example is given to illustrate the relational operation intersection s1 & s2 Union s1 | s2 Differen ...

Posted by chrisv on Thu, 24 Feb 2022 12:11:41 +0100

Java --- object and polymorphism

Three characteristics of object-oriented: encapsulation, inheritance and polymorphism encapsulation In order to ensure the security of variables, we use encapsulation, do not care about the specific implementation details, but only access the members of the class through external excuses. public class Student { private String name; p ...

Posted by brain on Thu, 24 Feb 2022 10:47:15 +0100

[introduction to Python tutorial] basic data types of Python

The essence of a computer is calculation. Internally, it is the change of bits of 0 and 1, and externally, it is the change of data. So what data can computers process? In essence, data is stored in bytes. In terms of performance, they are integers, floating-point numbers, strings and so on. Python's basic data types are no more than this. I ...

Posted by evanesq on Thu, 24 Feb 2022 09:18:43 +0100

[programmer's utility recommendation] Mac efficiency artifact Alfred

Alfred is a powerful artifact that can effectively improve the efficiency of MAC computers. It can be said that with Alfred, you can basically realize various operations without the mouse. Compared with the Mac's own focus search, it can be called a rolling advantage.The following figure shows the Alfred icon on the official website: https://ww ...

Posted by myharshdesigner on Thu, 24 Feb 2022 08:12:35 +0100

Spring Boot e-commerce project 25: commodity classification module 4: use Swagger to automatically generate API documents; (PS: the @ Configuration annotation is used again on the Configuration class)

explain: (1) Swagger's main function is to [generate API documents]; Moreover, swagger will update in real time when our project is updated; catalogue 1: Introduce and configure Swagger;   1. In POM XML, introduce the dependencies required by Swagger; 2. At the program entrance MallApplication, use [@ EnableSwagger2 annotation]: o ...

Posted by solarisuser on Thu, 24 Feb 2022 07:19:46 +0100

Python multithreaded programming - queue class of 10 Queue module

Catalogue 1. Usage scenario of queue class 2. queue class 2.1. queue class constructor 2.2 queue class attributes and methods 3. queue.Queue usage scenario 3.1 creating queues 3.2 use the methods of empty(), full(), qsize() to check the queue status 3.3 use put(), put_ The nowait () method is inserted into the queue 3.4 using get(), ge ...

Posted by chinni_77 on Thu, 24 Feb 2022 06:25:10 +0100

Structure of java class 2: Method - (12)

Class design, the second of two important structures: method Method: describe the function that the class should have. For example: Math class: sqrt()\random() Scanner Class: nextXxx() ... Arrays Class: sort() \ binarySearch() \ toString() \ equals() \ ... 1. Examples:public void eat(){}public void sleep(int hour){}public String getName(){ ...

Posted by Link on Thu, 24 Feb 2022 02:58:59 +0100

JAVA basic syntax

1.JAVA escape characters -- common escape characters \t: A tab stop to realize the alignment function \n: Line feed \: one\ \: one \': one' \r: A carriage return System.out.println("Digital and efficient office\r information"); \\Information efficient office System.out.println("Digital and efficient office\r\n information"); \\Digita ...

Posted by gorskyLTD on Thu, 24 Feb 2022 01:49:20 +0100

Introduction to Python zero Basics - 14 - tuples in Python

What is a tuple Tuple is a data type similar to list and. They have basically the same characteristics, but they also have many differences. Tuples, like lists, are queues that can store multiple data structuresThe same tuple is also an ordered set with repeatable elements Definition and creation of tuples In Python, tuple represents th ...

Posted by dslax27 on Thu, 24 Feb 2022 01:38:49 +0100